-4

Due to some reason ... i need to open the browser window manually and do some steps before running the script. after running the script i want it to connect with that window only (manually opened).

p.s-since its manually opened .. cant pass the object of the WebDriver.

how can i direct my script to use that specific window.

somewhere found this-

driver = new RemoteWebDriver(newURL("http://10.0.1.10:4444"), new DesiredCapabilities());

Q1.how can found the this url "http://10.0.1.10:4444" which will work for me. Q2. how will this driver know to go to firefox only and not chrome or IE. and to connect with particular tab and not the any other tab.

:- though i can keep only only one tab open in firefox.. Q2,second part for knowledge purpose only.

any kind of help will be highly appreciated. Thanks

Shubham Jain
  • 16,610
  • 15
  • 78
  • 125

2 Answers2

1

As you can see here

It is not currently possible to connect to a browser which is not opened by selenium. What you can do is start the browser via selenium and then wait until you're done with your actions before continuing. Something like the following:

Start browser
Wait until element visible with long timeout
//Perform manual actions on browser
//Open page to test manually
//Testscript now executes because element at step 2 is found
Community
  • 1
  • 1
Mobrockers
  • 2,128
  • 1
  • 16
  • 28
0

WebDriver spawns its on own browser instance, it cannot work on already open browser window. If you can mention what steps you have to manually do before starting the webdriver script then help can be provided on that.

  • I need to automate Web. whatsapp.. .. For that I need to scan QR.. which needs to be done manually.. – Aakansha May 27 '16 at 16:08