"[ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: NoSuchWindowException: Message: Unable to get browser" was returned only on IE

900 views
Skip to first unread message

Xianle Yan

unread,
Apr 4, 2018, 4:53:32 AM4/4/18
to robotframework-users
I tried to run Selenium case on IE, it failed. I used the same on  EDGE/Firefox/Chrome, it worked well.

Could you please help me fixing the issue, and tell me what's wrong with my script.  Appreciate for your help.

Version:
     Python: 3.6.5
     Robotframework: 3.0.2
     robotframework-seleniumlibrary: 3.1.1
     selenium: 3.11.0
     OS: Win10 x64
     IE: 11.309.16299.0
     IEDriverServer:  3.9.0.0(32-bit)
   

To make it's easier to read, here are the simplest case:

*** Settings ***
Documentation Suite description
Library SeleniumLibrary

*** Test Cases ***
demo
[Tags] demo
Open Browser http://google.ca ie
input text xpath://*[@id="lst-ib"] canada
press key xpath://*[@id="lst-ib"] \\13
[teardown] close all browsers


It failed with below message:
Sslvpn.Demo :: Suite description                                             
==============================================================================
demo                                                                  [ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: NoSuchWindowException: Message: Unable to get browser

screenshot from log.html:


Auto Generated Inline Image 1

Hélio Guilherme

unread,
Apr 4, 2018, 6:24:04 AM4/4/18
to robotframework-users
The test case you show, worked fine in my system (same versions, except my Python 2.7.13).
But the output you show is different at "Input Text   ${LOGIN_USERNAME_TEXT}   ${GUI_USERNAME}", and your locator is CSS and in the example XPATH.

It is not clear why it failed, but it is frequent that when failures occur, the window is not there at the moment of screen capture.

Try to run test with loglevel TRACE.

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsubscrib...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.



--
My Favorite Open Source Projects
awsome-lists gretl meld robotframework wxPython
Reply all
Reply to author
Forward
0 new messages