Selenium 3.0

1. How to launch Firefox browser in Selenium 3.0


-Download geckoDriver.exe from  
https://github.com/mozilla/geckodriver/releases
 
-Set system property using below code
 
System.setProperty("webdriver.gecko.driver","Path to geckodriver.exe");  
OR
System.setProperty("webdriver.firefox.marionette","Path to geckodriver.exe"); 

-Create a new instance of the Firefox driver and site
       
         WebDriver driver = new FirefoxDriver();
          driver.get("https://www.google.com");


----------------------------------------------------------------------------------------------------------------
FYI...
Marionette
Marionette is an automation driver for Mozilla's Gecko engine. It can remotely control either the UI or the internal JavaScript of a Gecko platform, such as Firefox. It can control both the chrome (i.e. menus and functions) or the content (the webpage loaded inside the browsing context), giving a high level of control and ability to replicate user actions. In addition to performing actions on the browser, Marionette can also read the properties and attributes of the DOM.
If this sounds similar to Selenium/WebDriver then you're correct! Marionette shares much of the same ethos and API as Selenium/WebDriver, with additional commands to interact with Gecko's chrome interface. Its goal is to replicate what Selenium does for web content: to enable the tester to have the ability to send commands to remotely control a user agent.
---------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment

MobileAutomation - Handle Pop-ups, Alerts and Prompts in Automate and App Automate Tests

This article shows you how to handle user permission pop-ups, alerts, and prompts in your automated tests on BrowserStack. Introductio...