The post Webdriver | Work With Multiple Browsers | Driver Parking appeared first on TestMate.
]]>''Park upto 5 instances of driver''
'Initialize the driver
Call wd.InitializeFireFoxDriver("C:\Users\jaska\Desktop\selenium")
'Navigate to the desired URL
Call wd.NavigateToUrl("https://www.google.com/")
'Park the current object instance in the reserved space - so that a new driver object can be created without loosing the old one
'FF driver - Parking Space 1
Call wd.ParkDriver1()
'Initialize IE Driver
Call wd.InitializeInternetExplorerDriver("C:\Users\jaska\Desktop\selenium")
'Navigate to the desired URL
Call wd.NavigateToUrl("https://www.google.com/")
'Park the current object instance in the reserved space - so that a new driver object can be created without loosing the old one
'IE driver - Parking Space 2
Call wd.ParkDriver2()
'Initialize Chrome Driver
Call wd.InitializeChromeDriver("C:\Users\jaska\Desktop\selenium")
'Navigate to the desired URL
Call wd.NavigateToUrl("https://www.google.com/")
'Type in Chrome
Call wd.SendKeys("name::q","This is Chrome")
'Switch Back to Internet Explorer
Call wd.UnParkDriver2()
'Type in IE
Call wd.SendKeys("name::q","This is IE")
'Switch Back to FireFox
Call wd.UnParkDriver1()
'Type in FireFOX
Call wd.SendKeys("name::q","This is Firefox")
The post Webdriver | Work With Multiple Browsers | Driver Parking appeared first on TestMate.
]]>