Hello all.....
I'm using python for selenium and web automation. There is one question that I'm curious.
If I want to create remote library for selenium to use it for example with robot framework I need to prepare some keywords etc... this is not a problem...
Let's explain it on example:
I implemented commands
1. Run browser <browser>
2. Navigate To <url>
3. Click Button <button id>
This communication is handled by xmlrpc... so problem is:
def run_browser(browser):
browser = getattr(webdriver, browser)()
return browser
def navigate_to(url):
browser = ????
return browser.get(url)
in step 1. you normalny starts broswer, and it will return it...
but in step2 if you are going to get ulr, you have problem, you don't have browser handle...
so to sum it up... how to get handle of started browser? I tried to open new browser, and than get handles of opened browsers with browser.window_handles but it only gets handle of browser opened by selenium..
Is there any way how to get handle of browser, that is not opened by selenium? and switch to this window? Or I have to find some kind of hack to do this?
Ty