Selenium – Skipping/Ignoring tests in TestNG - Objective Quickly learning ways to skip or ignore a test case in TestNG. Ignoring a test One can ignore a test during execution by simply adding enabled=false in the test. Example: SkipException Another way is to use SkipException to skip the test. Below is the code example on how to use this exception  
Appium Studio – Setup on Windows - Objective Since we are starting with Mobile Automation with Appium in this article we are going to use Appium Studio – Community Edition from Experitest. Why? Because to save the hectic and cumbersome installation of appium framework. Moreover, installing the Appium on Windows will not allow you to use iOS devices for automation. Consider this […]
Selenium – Headless with HtmlUnitDriver - Objective Run Selenium tests in headless mode (i.e. without opening browser) with inbuilt HtmlUnitDriver. This is very easy and just 2 line code. Test1.java Create a java class Test1.java and paste following code in it. And we are done 🙂 Notice that we have used true in HtmlUnitDriver, this is done to enable javascript support. Ignoring Warnings You’ll notice […]
Selenium with Cucumber and Gradle - Objective Using Selenium with Cucumber and Gradle instead of Maven. We are going to use: IntelliJ Ultimate Edition Cucumber Gradle Selenium Java TestNG Purpose is to move from maven to gradle to get more options and flexibility which is helpful in CI/CD integration. Creating Project Lets quickly create a Gradle project in IntelliJ. Open File […]
Selenium – Cucumber – Passing Parameters - Objective We are going to pass parameters from Cucumber feature file to its corresponding steps file. What we are going to use: IntelliJ as IDE Selenium (for testing) TestNG Cucumber for TestNG dependency Cucumber Java dependency Simple parameter passing FirstTest.feature Lets create a feature file for Cucumber steps. Make sure that Cucumber and Gherkin plugin […]
Protractor – Locators - Objective Well not much of an objective but for the keepsake of all the locators available in Protractor for identifying elements. Function Description Usage Website DOM partialButtonText Find a button by partial text. cssContainingText Find a button by partial text. deepCss Find an element by css selector within the Shadow DOM. options Find an element […]
Protractor – Multiple specs files – IntelliJ - Objective Just like in selenium, we have multiple test files, we can implement the same in Protractor by creating multiple specs files. Create one spec file which opens http://www.viu.com and verifies the title Create one spec file which opens http://www.google.com and verifies the title Project Structure Our project structure in this example will be as […]
Cucumber Setup – TestNG – Selenium - Objective Now a days lot of companies are asking for knowledge of BDD and exposure or experience in Behat/Cucumber. Don’t be too worried about Cucumber. Cucumber is nothing but Steps written in Gherkin language to which we have to map corresponding code. What we will be using: IntelliJ IDE – My favorite Cucumber plugin Gherkin […]
“Wait” in Page Object Factory – Selenium - Objective A quick demo on how to wait for an element in Page Object Factory. As we know, there are two ways of using page object pattern, one is using “By” and another one is using page object factory (i.e. “FindBy”). In the PageObjectModel using “By” we can use the explicit and implicit wait for […]
Mouse Over/Hover Action – Selenium - Objective Our objective in this small project is to do a mouse over on a particular link. We are not suppose to actually click it, only to hover our move on it. We are going to use Actions available in Selenium and chain them together since there is no separate “move hover/ mouse over” action […]
Advertisements