Create a profile object:
FirefoxProfile profile = new FirefoxProfile();
Now we need to install the add-on. WebDriver can only install add-ons that are on the local hard drive:
Pass the profile into FirefoxDriver and then run your test. Your code would look like the following:
What just happened?
We have just installed a Firefox add-on into the browser before we run our test. This is much simpler than it used to be in Selenium Remote Control where we would need to load the profile manually and make the changes that we needed and then run our tests telling Selenium Server to use this profile. The old process is not very portable compared to what we just did.
So far we have learnt to load Firefox and make changes to the browser before it loads which can be quite useful if we need to get more information out of the browser or make debugging issues a lot simpler.
Have a go hero - installing Firebug and not loading the First Run page
A lot of people like to use Firebug with WebDriver but get really annoyed with the First Run page.
To get around this, we are going to have to update the version of Firebug in your Firefox Preferences.
We will set the version to 99.9:
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.