'Capture Page Screenshot' could not be run on failure: No browser is open error while running test case.

4,016 views
Skip to first unread message

Deepak Suri

unread,
Jan 28, 2017, 3:54:06 PM1/28/17
to robotframework-users
My selenium test case is not executing, kindly give me the solution ASAP.




Selenium TC1
    Open Browser    https://www.google.com    ff
    Selenium2Library.Close Browser




----------------------------------------------------------------------------------

SUITE Robot Test case
Full Name:Robot Test case
Source:C:\Robot\Robot_Test_case.txt
Start / End / Elapsed:20170128 16:53:20.856 / 20170128 16:54:59.598 / 00:01:38.742
Status:1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
00:01:38.165 TEST Selenium TC1
Full Name:Robot Test case.Selenium TC1
Start / End / Elapsed:20170128 16:53:21.428 / 20170128 16:54:59.593 / 00:01:38.165
Status:FAIL (critical)
Message:WebDriverException: Message: Can't load the profile. Profile Dir: c:\users\dsuri2~1\appdata\local\temp\tmpqv_yai\webdriver-py-profilecopy If you specified a log_file in the FirefoxBinary constructor, check it for details.
00:01:38.160 KEYWORD Selenium2Library . Open Browser https://www.google.com, ff
Documentation:

Opens a new browser instance to given URL.

Start / End / Elapsed:20170128 16:53:21.430 / 20170128 16:54:59.590 / 00:01:38.160
00:00:00.111 KEYWORD Selenium2Library . Capture Page Screenshot
Documentation:

Takes a screenshot of the current page and embeds it into the log.

Start / End / Elapsed:20170128 16:54:59.376 / 20170128 16:54:59.487 / 00:00:00.111
16:54:59.484FAILNo browser is open
16:53:21.433INFOOpening browser 'ff' to base url 'https://www.google.com'
16:54:59.490WARNKeyword 'Capture Page Screenshot' could not be run on failure: No browser is open
16:54:59.588FAILWebDriverException: Message: Can't load the profile. Profile Dir: c:\users\dsuri2~1\appdata\local\temp\tmpqv_yai\webdriver-py-profilecopy If you specified a log_file in the FirefoxBinary constructor, check it for details

Hélio Guilherme

unread,
Jan 28, 2017, 6:55:01 PM1/28/17
to robotframework-users
You should give us more details.
Based on what you show, here are my questions:
Is the `Open Browser` keyword from Selenium2Library ? The other keywords are prefixed, and this one is not.
Does your test work with other browser, for example Google Chrome?
What version of selenium are you using? See with `pip show selenium`
What version of Firefox are you using? If >47.0.1 did you installed geckodriver?

--
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+unsub...@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.

YM Venkatesh

unread,
Jan 29, 2017, 10:22:03 AM1/29/17
to robotframework-users
Hi Hélio Guilherme,

I face the similar issue, Open browser keyword does not open FireFox Browser 47.0.1.

More details on the environment
1. Selenium Version: 3.0.2
2. Name: robotframework-selenium2library and Version: 1.7.3
3. Extracted latest version geckodriver - c:\geckodriver as wires.exe
4.set environment variable for wires.exe

Keyword to Open the browser is defined below

Opens browser in Selenium GeckoDriver
    ${ff default caps}    Evaluate    sys.modules['selenium.webdriver'].common.desired_capabilities.DesiredCapabilities.FIREFOX    sys,selenium.webdriver
    Set To Dictionary    ${ff default caps}    marionette=${True}
    Open Browser    ${LOGIN URL}  ${BROWSER}


Issue displayed in log :
WebDriverException: Message: Can't load the profile. Profile Dir: c:\users\user\appdata\local\temp\tmpletc2m\webdriver-py-profilecopy If you spe

cified a log_file in the FirefoxBinary constructor, check it for details.

Note - I have also tried using different browsers IE, Chrome. it does not open

Please help me with the issue.

dm08

unread,
Jan 29, 2017, 12:24:33 PM1/29/17
to venka...@gmail.com, robotframework-users
This the last version of firefox is not compatible with marionette (It is only supports old firefox driver). 
Please, use the latest version of firefox if you want to use marionette.
Moreover,  binary should be called ‘geckodriver.exe’ so please dowload uptodate binary as well. 

Thanks, 
Dmitriy



--
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-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.

Tatu Aalto

unread,
Jan 29, 2017, 12:35:00 PM1/29/17
to dmitriy...@gmail.com, robotframework-users, venka...@gmail.com
Ugh

Or if you want to use that version of Firefox, then use latest selenium 2 series.

-Tatu
Send from my mobile

To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.

--
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+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.

jeya shini

unread,
Sep 26, 2017, 2:04:22 AM9/26/17
to robotframework-users
I too face similar error.
How did this get fixed ?

Tatu Aalto

unread,
Sep 26, 2017, 7:35:10 AM9/26/17
to jeya...@gmail.com, robotframework-users
Reply all
Reply to author
Forward
0 new messages