Skip to content

Commit

Permalink
Merge pull request #5 from qahive/support-robotframework-puppeteer-v2
Browse files Browse the repository at this point in the history
Support robotframework puppeteer v2
  • Loading branch information
atthaboon authored Feb 12, 2021
2 parents 4da0ab2 + 9a85ff3 commit cc97651
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,5 @@ report.html
Examples/red.xml
Examples/.project
Examples/.gitignore
Examples/puppeteer-screenshot-1.png
Examples/selenium-screenshot-1.png
2 changes: 0 additions & 2 deletions Examples/quick-start.robot
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ Capture http page screenshot
${HEADLESS} Get variable value ${HEADLESS} ${False}
&{options} = create dictionary headless=${HEADLESS}
Open browser http://example.com options=${options}
Maximize Browser Window
Percy Snapshot HTTP page

Capture https page screenshot
${HEADLESS} Get variable value ${HEADLESS} ${False}
&{options} = create dictionary headless=${HEADLESS}
Open browser https://www.w3schools.com/ options=${options}
Maximize Browser Window
Percy Snapshot HTTPs page

4 changes: 2 additions & 2 deletions PuppeteerPercy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from robot.api.deco import keyword, not_keyword
from robot.libraries.BuiltIn import BuiltIn

__version__ = '0.1.0'
__version__ = '0.1.1'


class PuppeteerPercy:
Expand All @@ -27,7 +27,7 @@ def percy_snapshot(self, name, **kwargs):
@not_keyword
async def percy_snapshot_async(self, name, **kwargs):
puppeteerLibrary = BuiltIn().get_library_instance('PuppeteerLibrary')
page = puppeteerLibrary.get_current_page()
page = puppeteerLibrary.get_current_library_context().get_current_page()

# Exit if we have failed to connect to the percy-agent server
if self.percyIsRunning == False:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Keyword documentation
---------------------
See [`keyword documentation`](https://qahive.github.io/robotframework-puppeteer-percy/PuppeteerPercy.html) for available keywords and more information about the library in general.

Require [robotframework-puppeteer]](https://github.com/qahive/robotframework-puppeteer) version 2 or above.

Installation
------------
Expand Down

0 comments on commit cc97651

Please sign in to comment.