Selenium Simplified - Automated Browser Testing With Selenium WebDriver Made Simple

Aug 16, 2016 - 3 minute read - Selenium Simplified Blog WebDriver

How to debug chained WebDriver `findElement` methods in Java

TLDR; split code across lines and breakpoint, and use browser dev tools to test the locators used. Have you ever had an argument about fluent code? Discussions about “train wrecks” and “impossible to debug”? WebDriver has the ability to chain findElement calls, and create such “train wrecks”. How do you debug it if you use it? (There is a summary video at the bottom of this post.) Example: WebElement element = driver.

Aug 5, 2016 - 1 minute read - Selenium Simplified Blog WebDriver

Selenium WebDriver 3.0.0-beta2 and JUnit and GeckoDriver v 0.10.0

I started to have a look at Selenium WebDriver 3.0.0-beta2 And my @Test methods were running from the IDE, but not running on CI. The effect in CI was, no tests executing at all: Running TestSuite Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@77468bd Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.424 sec I don’t use TestNG, I use JUnit. Since this only happened when I switched to 3.

Aug 5, 2016 - 2 minute read - Selenium Simplified Blog WebDriver

WebDriver Windows 10 Anniversary Build and Edge 14393

TLDR; if your version of Edge is not listed on the WebDriver Edge page, try the insider build. I am experimenting with Selenium WebDriver 3.0.0 beta2 at the moment - more on that later. And this morning I could not get MS Edge to work. I could not understand how the beta was affecting Edge. And then I remembered that I upgraded to Windows 10 Anniversary last night so now Edge is on a new version:

Aug 4, 2016 - 4 minute read - Selenium Simplified Blog WebDriver

Question: What is the best Page Object framework for Java?

TLDR; Q: what is the best Page Object framework? A: I don’t know. I don’t use any Question: What is the best Page Object framework for Java? And are there any tools to build Page Objects e.g. scan the page and create a class with all the @FindBy annotations on WebElements etc. Answer: I don’t know. I have not researched any Page Object frameworks. I don’t use any, and don’t recommend any.

Jul 29, 2016 - 2 minute read - Selenium Simplified Blog WebDriver

First impressions of Selenium WebDriver 3.0.0 beta 1

TLDR; Selenium 3 WebDriver is pretty much a drop in replacement for Selenium 2 WebDriver The 3.0.0 Beta v1 version of WebDriver has been released and my first Impressions of Selenium 3 beta are very good. And first impressions means, can I run the stuff I have already. I amended the pom.xml to bring the release down from maven central. <!-- <webdriver.version>2.53.1</webdriver.version> --> <webdriver.version>3.0.0-beta1</webdriver.version> So I effectively included it as

Jul 29, 2016 - 2 minute read - Selenium Simplified Blog WebDriver

Comparing WebDriver 2.53.1 execution for Firefox, Chrome, IE, HTMLUnit, Edge and Marionette

The Selenium 2 WebDriver with Java course has a new Continuous Integration section. Instead of using SVN we now use Git and have the source for the CI experimentation in Git (more info on this update). As part of this process I ran all the tests on all current versions of browsers to see the status. I last performed this type of retrospective back on (WebDriver 2.42.2]( And boy have things changed with WebDriver 2.

Jul 24, 2016 - 3 minute read - Java Selenium Simplified Blog WebDriver

Using Intellij to debug @Test with the 'Watch' function

I was sent a query about why a cookies test was failing on Chrome but not on Firefox. The debug process involved me using techniques that I don’t think I have blogged about or demonstrated before so I repeated the debug session for a video and have written it up here. Essence: Run test on Firefox to make sure it does work Change Run configuration in IntelliJ to configure Chrome as the browser Breakpoints on relevant lines Add a watch that uses ‘code’ not just a variable name Step through the code comparing my expectations with the actual values shown in the variables and watch view I have a Driver class, which allows me to configure which driver I use by a method call, or environment variables or properties.

Jul 22, 2016 - 2 minute read - Selenium Simplified Blog WebDriver

Appium - a very short getting started guide

I recently amended the Selenium WebDriver API with Java online training to include a section on Appium with Android. In essence, Appium for mobile web testing is pretty simple, you simply use RemoteWebDriver to connect to the Appium server. Use the capabilities to setup the remote webdriver. DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("deviceName", "emulator-5554"); capabilities.setCapability("platformName", Platform.ANDROID); // if you are using an up to date version of android to you can use "Chrome" as the app, // otherwise "browser" is the default 'browser' on Android capabilities.

Jul 20, 2016 - 5 minute read - Java Selenium Simplified Blog WebDriver

How to investigate and debug a Selenium WebDriver `@Test` error

Here’s the situation. You’ve written some code to automatically execute your application. You’re using Selenium WebDriver. Bam. Something goes wrong. You don’t know what to do. Do you: A) investigate? B) ask someone else to fix your problem? If you answered B to the question above, then in this post I’ll show you some strategies to help with (A). You do have to develop the skills to investigate your own issues.

Jun 30, 2016 - 2 minute read - Selenium Simplified Blog WebDriver

Use Selenium WebDriver 2.53.1 with Firefox 47.0.1

TL;DR Upgrade to Firefox 47.0.1 and use Selenium WebDriver 2.53.1 (locally at the moment) to use the FirefoxDriver I suspect this will be a fairly short lived post since Selenium WebDriver 2.53.1 will be in maven central soon. But longer term this post will act as an example of how to use a version of Selenium WebDriver that you have downloaded, without it being present in maven central repositories. As per this tweet by Jim Evans: