Reputation: 125
My Firefox recently got updated recently. My firefox version is 44.0.1. When I run a simple code as below in selenium webdriver, two tabs are opening in firefox. How can i get rid of the unwanted tab. I changed Firefox setting, but still two tabs are opening. one tab is a plain tab and the second tab is https://support.skype.com/en/faq/FA34612/what-is-the-skype-extension. How can I load my URL that I want to automate in a single firefox window. Do I need to change any firefox setting.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.Test;
public class Another {
@Test
public void tester(){
WebDriver driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.get("http://jqueryui.com/datepicker/");
}
}
Upvotes: 2
Views: 3290
Reputation: 3927
Create a Firefox Profile and save it with name after making settings as per your requirement. Please call this profile in script.
Here is the steps to create firefox profile
Below is the script for example
ProfilesIni profile = new ProfilesIni();
FirefoxProfile myprofile = profile.getProfile("CreatedProfile");
WebDriver driver = new FirefoxDriver(myprofile);
Thank You, Murali
Upvotes: 3