Closed ghost closed 6 years ago
@Meilindis Thank you for your report. Would you have any other example than Google? I'm unable to reproduce the issue with the version of their homepage I get.
Does it make difference to add keyword call
Bootstrap jQuery
before Capture and crop page screenshot
?
As a reference, an example that seems to work:
*** Test Cases ***
Test
Open Browser https://www.seleniumhq.org/ browser=headlessfirefox
Capture and crop page screenshot menubuttons.png css=#menu_about css=#menu_support
Close Browser
So, possibly there is a corner case that causes errors. Reproducible example could help here.
@Meilindis I'm sorry about my earlier comment. Me unable to properly run the given example was due to my setup. The example run without errors and reproduced the following image for me with headlessfirefox (supported by the latest seleniumlibrary).
Test
Open Browser https://www.google.com/ browser=headlessfirefox
Bootstrap jQuery
Capture and crop page screenshot Google.png css=#hplogo css=#lst-ib # Crop to include the Google logo and search bar only.
Close Browser
Thank you for your quick reply!
I have tried adding Bootstrap jQuery, but it did not make a difference. I'm using Firefox Developer edition, by the way.
I guess it may have to do with my setup somehow, if it works for you. I'll attach the log of the simple test, perhaps you can see what goes wrong. log.zip
@Meilindis Thank you. The log revealed a real issue. I cannot fix this today, but hopefully this week.
A workaround is to use Python 3 if possible.
@datakurre Thank you very much! I will use Python 3 for now, then.
I really appreciate your efforts to make this library available to us!
@datakurre Do you have an estimate when this issue will be fixed? Thank you!
@Meilindis Thank you for reminding. This should be now fixed in https://pypi.python.org/pypi/robotframework-selenium2screenshots/0.8.1
If not, please, reopen the issue.
@datakurre Thank you, it is working now!
Situation
I want to create a screenshot of the bounding box that covers two elements. I'm using Python 2.7 and Selenium2Screenshots 0.8.0, and create the screenshots in Firefox. When I execute the keyword, I get a JavaScript exception:
I have tried to use CSS selectors and XPaths as the locators, and both produce the same error. I created a simple testcase which produces the same error: