Author: rsblogadmin

Playwright Java setup in Eclipse IDE

In this blog, you will learn how to create a Playwright Java project in the Eclipse IDE. You will also learn how to add the maven dependencies such as: Junit jupiter, Junit jupiter params, Junit playwright and JUnit Jupiter Engine. Additionally, you will configure JavaSE-1-1.8 and create a Java maven playwright project in eclipse. Topics […]

Boost Your Coding Efficiency: Mastering GitHub Copilot Extension in VS Code

Ever wished you had a coding partner who never sleeps, always ready to assist, and capable of turning your ideas into code in seconds?  Imagine the possibilities when your development workflow is supercharged by an AI-powered assistant. Welcome to the world of GitHub Copilot—a game-changer for developers aiming to elevate their productivity and streamline their […]

DesiredCapabilities/BrowserOptions in Selenium

headless launch option Accept and bypass privacy error disable info bar change height/width of window run code in incognito mode (private browsing) launch browser in mobile view headless launch option Let us google search “upgrade to selenium 4” Click the first search result link https://www.selenium.dev/documentation/webdriver/troubleshooting/upgrade_to_selenium_4/  Notice below that the DesiredCapabilities is now kind of deprecated. […]

Groups attribute in TestNG

Include groups at test tag level Exclude groups at test tag level Include groups at test tag level Let us now see how to group @Tests using groups attribute in TestNG. Let us create ‘LoginUser’ class under below package Add 5 @Test methods Add groups={“smoke”} for first and third @Test, see below Let all 5 […]

Priority attribute in TestNG

Default execution order of @Test methods Priority attribute usage Priority = 0 Priority = -1 (negative priority) Same priority to all test methods Default execution order of @Test methods  Ensure that you have TestNG installed.  If TestNG is not installed, than perform following steps: Help > Eclipse Marketplace…  Enter Testng in search field as shown […]

Exceptions in Selenium

InvalidArgumentException UnhandledAlertException NoAlertPresentException InvalidSelectorException NoSuchElementException TimeoutException NoSuchSessionException ElementNotVisibleException StaleElementReferenceException Compound class names not permitted Element not clickable at point (yy, zz) NoSuchFrameException NoSuchWindowException InvalidArgumentExceptionInvalidArgumentException is thrown when we do not include https:// or http:// in the url. Notice below, we get InvalidArgumentException since https:// is missing in url To resolve this exception, we have to […]

TestNG Annotations

1. TestNg annotation: @BeforeTest2. TestNg annotation: @AfterTest3. TestNg annotation: @BeforeSuite4. TestNg annotation: @AfterSuite5. TestNg annotation: @BeforeMethod6. TestNg annotation: @AfterMethodTestNg annotation: @BeforeTest Let’s say, before you run any test case, there is a pre-requisite to clean the data that you have created in the database. This can be achieved using @BeforeTest. Thus, @BeforeTest annotation would be […]

Explicit wait in Selenium

1. Introduction of explicit wait in Selenium 2. Practical usage of explict wait 3. Source code Introduction of explicit wait in Selenium In the previous blog, we have studied about implicit wait, the default wait time selenium waits to find elements on web page.  Sometimes we may want to wait extra time only for a […]

Implicit waits in Selenium

1. Implicit wait usage in Selenium 2. Custom implict wait 3. Source code Implicit wait usage in Selenium The below official page describes the various Timeouts in Selenium https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/WebDriver.Timeouts.html  As seen in below description, no limit is set for default timeout in Selenium Let us go to http://uitestingplayground.com/ajax to understand the usage of timeouts in […]

Handle WebTables in Selenium Webdriver

Navigate to https://money.rediff.com/index.html Click ‘More gainers’ link that you see in below figure You get a list of all the companies, see below figure This is an example of Webtable, it is a kind of an excel file where elements are present in a systematic tabular manner. Right click & inspect this Webtable, you will […]