Executing Selenium Script on chrome (opening and closing of browser)
PRACTICAL 6:
Executing Selenium
Script on chrome (opening and closing of browser)
·
Download
Chrome Drive
open http://www.seleniumhq.org/download/
Here you will get third party driver section and you can get all the external driver for different browsers.
Here you will get third party driver section and you can get all the external driver for different browsers.
In this module we are working on Microsoft
edge and its web driver can be downloaded from: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
Figure 1-download link of Edge Driver
·
Here
you will get the driver zip file which you can extract.
·
Set
property in Environment Variables
§
Go to
My Computer and Right click to get the context menu.
§
Click
on the Change Settings on the opened
window.
Figure 2-change settings
§
Go to
Advance tab in the System Properties window and click on Environment Variables.
§
Now
under the System variables, select Path and click on Edit.
Figure 3-edit path
§
At
the end of the string use semicolon and paste the path of the Edge Driver.
·
Sample
Program for Launch Edge Browser using Selenium Web driver is shown below:
Figure 4-sample code
·
The Browser opens as follows:
NOTE: Make sure
before executing the script, the browser you want to open should be closed with
all the tabs.
Comments
Post a Comment