In this section, we will see how we can start OperaDriver and get it to click a button on the page.This simple test will give us the confidence to use Selenium WebDriver with Opera.
Update the setUp() method to load the OperaDriver() :
driver = new OperaDriver();
Now we need to find an element. In this section we will find the link Chapter 4:
WebElement element = driver.findElement(By.linkText("Chapter 4"));
Now we need to click on the link:
Run your test and it should look like the following:
What just happened?
We have just seen how easy it is to get the OperaDriver loading Opera and interacting with what is on the page. We used click() on a link so that we can navigate between pages. Just by changing the object that is instantiated in the setUp() method we got it to load.
Opera, like the previous browsers we have used, allows us to set details of the browser before the browser has started up. Let's have a look at how that works.
The OperaProfile is a new addition to the OperaDriver. It allows us to set details in the browser when the browser starts. Opera Software tests the browser where it can, so we can set a lot of details of the browser. In the following example, we are going to disable Geolocation from our tests.
Selenium Related Interview Questions
|SILK TEST Interview Questions||QTP Interview Questions|
|JMeter Interview Questions||Automation Testing Interview Questions|
|Software testing Interview Questions||JUnit Interview Questions|
|TestNG Interview Questions||SAP Testing Interview Questions|
|Selenium WebDriver Interview Questions||Selenium IDE Interview Questions|
|QUnit Testing Interview Questions||Performance Testing Interview Questions|
|Hadoop Testing Interview Questions|
Getting Started With Selenium Ide
Overview Of Selenium Webdriver
Working With Webdriver
Getting Started With Selenium Grid
Advanced User Interactions
Working With Html5
Migrating From Remote Control To Webdriver
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.