List of usage examples for org.openqa.selenium.firefox FirefoxDriver FirefoxDriver
public FirefoxDriver()
From source file:ejercicio1.pageFactory.TestLoginPage.java
@Before public void setUp() { driver = new FirefoxDriver(); //poLogin = new LoginPage(driver); poLogin = PageFactory.initElements(driver, LoginPage.class); }
From source file:ejercicio2.pageFactory.TestNewClient.java
@Before public void setUp() { driver = new FirefoxDriver(); poLogin = PageFactory.initElements(driver, LoginPage.class); }
From source file:es.udc.tfg_es.clubtriatlon.test.util.SeleniumMethods.java
License:Open Source License
private static final WebDriver auntenticate(String email, String password) { WebDriver driver = new FirefoxDriver(); driver.get("http://localhost:9090/triatlon/"); driver.findElement(By.linkText("Autenticarse")).click(); driver.getCurrentUrl(); //Update the Url driver.findElement(By.name("email")).sendKeys(email); driver.findElement(By.name("password")).sendKeys(password); driver.findElement(By.id("loginForm")).findElement(By.id("loginButton")).click(); return driver; }
From source file:euromillones.RobotEuromillonesJS.java
public RobotEuromillonesJS() { driver = (WebDriver) new FirefoxDriver(); js = (JavascriptExecutor) driver;/*from www . jav a2 s . com*/ this.url = "http://www.euromillones.com.es/resultados-anteriores.html"; driver.get(url); }
From source file:fbapi.FBAPI.java
/** * @param args the command line arguments *//* w w w . j a v a 2s . c o m*/ public static void main(String[] args) { // TODO code application logic here //https://developers.facebook.com/apps/YOUR_APP_ID/fb-login/ //https://www.facebook.com/v2.5/dialog/oauth?client_id=XXXXXXXXXXXXXXX&redirect_uri=http%3A%2F%2Fphotovote.dev%2Fauth%2Ffacebook%2Fcallback&scope=email&response_type=code&state=0ztcKhmWwFLtj72TWE8uOKTcf65JmePtG95MZLDD //https://www.facebook.com/v2.5/dialog/oauth?client_id=723262031081656&redirect_uri=http://taiwannoc.net/cgione&scope=email&response_type=code&state=0ztcKhmWwFLtj72TWE8uOKTcf65JmePtG95MZLDD //https://developers.facebook.com/apps/723262031081656/fb-login/ /*"http://www.facebook.com/dialog/oauth?" + "client_id=" + FB_APP_ID + "&redirect_uri=" + URLEncoder.encode(REDIRECT_URI, "UTF-8") + "&scope=public_profile";*/ //http://www.facebook.com/dialog/oauth?client_id=723262031081656&redirect_uri=http://taiwannoc.net/cgione&scope=public_profile String strAPPID = "723262031081656"; String strRedirectURL = "http://taiwannoc.net/cgione"; String strAuthUrl = "https://graph.facebook.com/oauth/authorize?type=user_agent&client_id=" + strAPPID + "&redirect_uri=" + strRedirectURL + "&scope=user_about_me," + "user_actions.books,user_actions.fitness,user_actions.music,user_actions.news,user_actions.video,user_birthday,user_education_history," + "user_events,user_photos,user_friends,user_games_activity,user_hometown,user_likes,user_location,user_photos,user_relationship_details," + "user_relationships,user_religion_politics,user_status,user_tagged_places,user_videos,user_website,user_work_history,ads_management,ads_read,email," + "manage_pages,publish_actions,read_insights,user_friends,read_page_mailboxes,rsvp_event"; System.out.println(strAuthUrl); //System.setProperty("webdriver.chrome.driver", "chromedriver"); System.setProperty("webdriver.chrome.driver", "geckodriver"); //WebDriver driver = new ChromeDriver(); WebDriver driver = new FirefoxDriver(); driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); driver.get(strRedirectURL); boolean isRunning = true; while (isRunning) { System.out.println("CURRENT_URL: " + driver.getCurrentUrl()); if (driver.getCurrentUrl().contains("facebook.com")) { String strURL = driver.getCurrentUrl(); System.out.println("STR_URL: " + strURL); driver.quit(); } isRunning = false; } }
From source file:Firefox.AddProductFirefox.java
@BeforeClass public static void setUpClass() throws Exception { System.setProperty("webdriver.gecko.driver", "D:\\Documentatie\\Selenium\\geckodriver\\geckodriver.exe"); driver = new FirefoxDriver(); driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); driver.manage().window().maximize(); driver.get(Constants.URLProdus);//www . j av a 2 s . c om }
From source file:Firefox.ContactPageFirefox.java
@BeforeClass public static void setUpClass() throws Exception { System.setProperty("webdriver.gecko.driver", "D:\\Documentatie\\Selenium\\geckodriver\\geckodriver.exe"); driver = new FirefoxDriver(); driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); driver.manage().window().maximize(); driver.get(Constants.URLRoot);/*from w ww . j av a2 s .com*/ }
From source file:fll.web.IntegrationTestUtils.java
License:Open Source License
private static WebDriver createFirefoxWebDriver() { if (!mInitializedWebDrivers.contains(WebDriverType.FIREFOX)) { FirefoxDriverManager.getInstance().setup(); mInitializedWebDrivers.add(WebDriverType.FIREFOX); }//from w w w . j a v a 2s . c om // final DesiredCapabilities capabilities = DesiredCapabilities.firefox(); // capabilities.setCapability("marionette", true); // final WebDriver selenium = new FirefoxDriver(capabilities); final WebDriver selenium = new FirefoxDriver(); return selenium; }
From source file:fr.lip6.segmentations.BrowserRep.java
License:Open Source License
public void setLocalDriver() { switch (this.desc) { case "firefox": this.driver = new FirefoxDriver(); break;/*from w w w . j a v a 2s. c o m*/ case "iexplorer": this.driver = new InternetExplorerDriver(); break; case "chrome": this.driver = new ChromeDriver(); break; case "opera": this.driver = new OperaDriver(); break; case "htmlunit": this.driver = new HtmlUnitDriver(); break; } setJSDriver(); this.driver.manage().timeouts().pageLoadTimeout(MAX_WAIT_S, TimeUnit.SECONDS); this.driver.manage().timeouts().implicitlyWait(MAX_WAIT_S, TimeUnit.SECONDS); this.driver.manage().window().setSize(new org.openqa.selenium.Dimension(1024, 768)); }
From source file:functional.org.ojbc.web.portal.controllers.AdvanceSearchFunctionalTest.java
License:RPL License
@Before public void setup() { driver = new FirefoxDriver(); }