Experience & exploration about software QA tools & techniques.
Maintaining & writing blog posts on qavalidation.com!
Publishing video tutorials on youtube.com/qavbox
In this post, we will see how to handle / automate drop down webelement in Selenium and Java. Use cases would be – select an option from the drop down Fetch all the options. Fetch the selected option A dropdown element on browser looks like below – The HTML associated with select or dropdown is…
Every browser application has it’s own delay in loading the elements when we open a web application / navigate from one page to another / perform some action. Loading depends on different criteria like internet bandwidth, technology used in the application, server capacity, no of users accessing the browser app etc… While executing tests in…
InvocationCount OutPut: Thread ID: 1Thread ID: 1Thread ID: 1Thread ID: 1Thread ID: 1 Above method ran 5 times, a single thread will be assigned to run the method one by one.. ThreadPoolSize OutPut [ThreadUtil] Starting executor timeOut:0ms workers:5 threadPoolSize:3Thread ID: 11Thread ID: 12Thread ID: 13Thread ID: 12Thread ID: 11 Above method ran 5 times, but…
alwaysRun is a testNG attribute which makes a test method run always even if it’s dependent method is not run… let’s see the code implementation public class AlwaysRun { WebDriver driver; @Test public void test1() { driver = new FirefoxDriver(); driver.get(“http:qavalidation.com”); Assert.assertTrue(driver.getTitle().contains(“Testing”)); } @Test(dependsOnMethods = {“test1”}, alwaysRun=true) public void test2() { driver.findElement(By.linkText(“Selenium Tutorial!”)).click(); } }…
There are situations when we want to run our tests depends on the prior test execution like if a particular test is run fine, then execute this test or else skip the test execution… Basically we are creating inter dependencies in test execution. Examples Launch browser with URL, verify if title matches, then login In…
There are situations where we need to skip one or more @Test method in testNG, for this TestNG provides enabled property to skip the execution of methods… enabled = false (skip the method run) enabled = true (execute method), it’s by default set to true, NOTE: if we do not mention enabled property, it’s set…
As we know testNG test methods are executed in alphabetical order by default, but testNG provides priority keyword to prioritize test case execution order and the value starts from -n to n… Priority value starts from any number from -ve to +ve, 0 is default (if nothing is set) For a method less priority number,…
TestNG description In framework, with growing number of automated test cases, it’s hard to have the test method names more descriptive, so testNG provides an attribute description to specify long description to understand what the test method is all about. TestNG groups In each release test cases keep adding to existing suite and after many…
There are situations in which we get browser popups or multiple browser windows, when we open an URL or click on an element on browser. Note – popups can be blocked in browser using some browser add-ons, but for testing purpose, sometimes we need to allow the popups or multiple windows. A single instance of…