We are going to do the basic task of loading the browser and type into the page.
Update the setUp() method to load the Firefox Driver(); driver = new Firefox Driver();
Now we need to find an element. In this section we will find the one with
the ID nextBid:
Now we need to type into that element:element.sendKeys("100");
Run your test and it should look like the following:
What just happened?
We have just seen how easy it is to run a test with Selenium WebDriver and Firefox. It loaded the browser and then typed into the browser. We can now do everything and anything that we want to the content that is loaded into the browser. Now let's have a look at all the other things that we can do with FirefoxDriver.
Firefox profile preferences
There are times where we need to update the preferences within Firefox. This could be to switch on parts of Firefox that are disabled while they are in development or if you want to get more information from the browser while your tests are running. To do this, we will need to instantiate a Firefox Profile object and then update the settings.
We will then need to pass this object into FirefoxDriver where we instantiate it. This will load the profile with your details you have set. This is like loading about:config in the browser and changing what you need to.
Let's see how we can do this with a code sample.
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.