SeleniumLibrary icon indicating copy to clipboard operation
SeleniumLibrary copied to clipboard

'Select Window’ with url strategy fails to locate window

Open yamateh opened this issue 12 years ago • 4 comments

def get_current_window_info(self):
    atts = self.execute_script("return [ window.id, window.name, document.title, document.URL ];")

it is 'document.URL',not 'document.url'

yamateh avatar Mar 11 '14 09:03 yamateh

Agreed: reference DOM level 2 @yamateh what browser/version/OS is this causing issues with for you?

ombre42 avatar Mar 11 '14 13:03 ombre42

browser:chrome 32 os:win7

yamateh avatar Mar 11 '14 13:03 yamateh

interface HTMLDocument : Document { attribute DOMString title; readonly attribute DOMString referrer; readonly attribute DOMString domain; readonly attribute DOMString URL;

yamateh avatar Mar 11 '14 13:03 yamateh

I also have this problem on Firefox : document.url is undefined and appears in get_current_window_info() values. So in my robot test, when trying to Select Window, I get AssertionError: ValueError: Unable to locate window with URL even if the URL is correct.

This commit is the cause of the change : 0bf17bc8bcec8d6f17704e74d5a7341a43dc8d7a. It refers to http://www.w3schools.com/jsref/prop_doc_url.asp, which also talks about URL and not url.

laulaz avatar Jun 30 '14 11:06 laulaz