caleeli / robotframework-seleniumlibrary

Automatically exported from code.google.com/p/robotframework-seleniumlibrary
Apache License 2.0
2 stars 0 forks source link

Select Window /Get Window Identifiers are not working #266

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Explain the defect you encountered either using free text or steps. Mention:

the expected and actual results.
1)Logged into gmail
2)selected an email
3) clicked a button in the email (acceptance)

   At this stage a new browser window opens

   I need to switch to this new browser window

I have tried running the following:

Get Window Identifiers

Select Window   
url=https://dev2.workshare.com/sign_ups/yIGYIIu2piFZtOmOPwll/edit

both give the following exception:

TypeError: object of type 'WebElement' has no len()

windows 8
Firefox 20.0.1
Selenium2Library 1.4
Python 2.7.5
Selenium 2.35
Robotframework 2.8.1

Original issue reported on code.google.com by adrian_u...@yahoo.co.uk on 1 Oct 2013 at 3:15

GoogleCodeExporter commented 9 years ago
Further investigation:

Error in 
C:\PYTHON27\lib\site-packages\Selenium2Library\locators\windowmanager.py on 
line 96 
Error in 
C:\PYTHON27\lib\site-packages\Selenium2Library\webdrivermonkeypatches.py on 
line 26

def get_current_window_info(self):
        atts = self.execute_script("return [ window.id, window.name,document.title,  document.url ];")
        atts = [ att if att is not None and len(att) else  'undefined'                 
            for att in atts ]   <----- Exception Raised here 

     return (self.current_window_handle, atts[0], atts[1], atts[2], atts[3]

Original comment by adrian_u...@yahoo.co.uk on 2 Oct 2013 at 8:15