|
Let's take one of our Selenium Remote Control tests and change it to use WebDriver Backed Selenium. This should be a simple change:
Open IDEA and load your example.
Create a new external library for the Selenium binaries. We learnt how to do this in Chapter 3, Overview of Selenium WebDriver.
Add the variable WebDriver driver at the top of your class.
Change your setup() to look like the following:
Change the teardown()to:
Run your tests.
What just happened?
We have seen how with very little change to our tests we have got our old Selenium Remote Control tests working using the new Selenium WebDriver drivers. The WebDriver Backed Selenium object has a mapping of the Selenium Remote Control API to the Selenium WebDriver API.
When the browser starts you will see the WebDriver extension in the bottom right of the browser. When it is processing commands, it will turn red and when it isn't it will be black. It should look like the following screenshot:
There are a few items that are not fully supported by WebDriverBackedSelenium, but hopefully as more and more work is done to the framework these will be less noticeable. This is available to all languages that can communicate with the remote server.
|
Selenium Related Tutorials |
|
---|---|
QTP Tutorial | JMeter Tutorial |
Software testing Tutorial | JUnit Tutorial |
TestNG Tutorial | SAP Testing Tutorial |
QUnit Testing Tutorial |
Selenium Related Practice Tests |
|
---|---|
QTP Practice Tests | JMeter Practice Tests |
Software testing Practice Tests | JUnit Practice Tests |
Performance Testing Practice Tests |
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.