Skip to content

Commit

Permalink
Version number bump to 0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
xylix committed Jun 26, 2020
1 parent ef09bb8 commit 94cea16
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,18 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Compile typescript
run: |
yarn install
yarn build
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Robot Framework Browser
run: |
make package
rm -rf dist
cp package.json Browser/wrapper/package.json
pip install .
rfbrowser init
- name: Run Robot Framework tests
Expand Down
2 changes: 1 addition & 1 deletion Browser/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.2.1"
__version__ = "0.2.2"

import re
import os
Expand Down
3 changes: 3 additions & 0 deletions Browser/keywords/browser_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def go_to(self, url: str):

@keyword
def take_page_screenshot(self, path: Optional[str] = None):
""" Take screenshot of current browser state and saves it to path.
By default saves to robot output dir.
"""
if path is None:
path = self.library.get_screenshot_path
logger.info(f"Taking screenshot into ${path}")
Expand Down
2 changes: 1 addition & 1 deletion docs/Browser.html
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@
jQuery.extend({highlight:function(e,t,n,r){if(e.nodeType===3){var i=e.data.match(t);if(i){var s=document.createElement(n||"span");s.className=r||"highlight";var o=e.splitText(i.index);o.splitText(i[0].length);var u=o.cloneNode(true);s.appendChild(u);o.parentNode.replaceChild(s,o);return 1}}else if(e.nodeType===1&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&!(e.tagName===n.toUpperCase()&&e.className===r)){for(var a=0;a<e.childNodes.length;a++){a+=jQuery.highlight(e.childNodes[a],t,n,r)}}return 0}});jQuery.fn.unhighlight=function(e){var t={className:"highlight",element:"span"};jQuery.extend(t,e);return this.find(t.element+"."+t.className).each(function(){var e=this.parentNode;e.replaceChild(this.firstChild,this);e.normalize()}).end()};jQuery.fn.highlight=function(e,t){var n={className:"highlight",element:"span",caseSensitive:false,wordsOnly:false};jQuery.extend(n,t);if(e.constructor===String){e=[e]}e=jQuery.grep(e,function(e,t){return e!=""});e=jQuery.map(e,function(e,t){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")});if(e.length==0){return this}var r=n.caseSensitive?"":"i";var i="("+e.join("|")+")";if(n.wordsOnly){i="\\b"+i+"\\b"}var s=new RegExp(i,r);return this.each(function(){jQuery.highlight(this,s,n.element,n.className)})}
</script>
<script type="text/javascript">
libdoc = {"all_tags":[],"contains_tags":false,"doc":"<p>Browser library is a web testing library for Robot Framework.\x3c/p>\n<p>This documents explains how to use keywords provided by the Browser library. For information about installation, support, and more, please visit the <a href=\"https://github.com/MarketSquare/robotframework-playwright\">project pages\x3c/a>. For more information about Robot Framework, see <a href=\"http://robotframework.org\">http://robotframework.org\x3c/a>.\x3c/p>\n<p>Browser library uses <a href=\"https://github.com/microsoft/playwright\">Playwright Node module\x3c/a> to automate <a href=\"https://www.chromium.org/Home\">Chromium\x3c/a>, <a href=\"https://www.mozilla.org/en-US/firefox/new/\">Firefox\x3c/a> and <a href=\"https://webkit.org/\">WebKit\x3c/a> with a single library.\x3c/p>\n<h3 id=\"Table of contents\">Table of contents\x3c/h3>\n<ul>\n<li><a href=\"#Locating%20elements\" class=\"name\">Locating elements\x3c/a>\x3c/li>\n<li><a href=\"#Shortcuts\" class=\"name\">Shortcuts\x3c/a>\x3c/li>\n<li><a href=\"#Keywords\" class=\"name\">Keywords\x3c/a>\x3c/li>\n\x3c/ul>\n<h2 id=\"Locating elements\">Locating elements\x3c/h2>\n<p>All keywords in Browser library that need to interact with an element on a web page take an argument typically named <code>selector\x3c/code> that specifies how to find the element.\x3c/p>\n<h3 id=\"Locator syntax\">Locator syntax\x3c/h3>\n<p>Browser library supports same selector strategies as the underlying Playwright node module: xpath, css, id and text. The strategy can either be explicitly specified with a prefix or the strategy can be implicit.\x3c/p>\n<h4 id=\"Implicit selector strategy\">Implicit selector strategy\x3c/h4>\n<h3 id=\"!!! THIS ISN'T IMPLEMENTED YET !!!\">!!! THIS ISN'T IMPLEMENTED YET !!!\x3c/h3>\n<p>The default selector strategy is <span class=\"name\">css\x3c/span>. If selector does not contain one of the know selector strategies, <span class=\"name\">css\x3c/span>, <span class=\"name\">xpath\x3c/span>, <span class=\"name\">id\x3c/span> or <span class=\"name\">text\x3c/span> it is assumed to contain css selector. Also <span class=\"name\">selectors\x3c/span> starting with <span class=\"name\">//\x3c/span> considered as xpath selectors.\x3c/p>\n<p>Examples:\x3c/p>\n<table border=\"1\">\n<tr>\n<td><span class=\"name\">Click\x3c/span>\x3c/td>\n<td>span &gt; button\x3c/td>\n<td># Use css selector strategy the element.\x3c/td>\n\x3c/tr>\n<tr>\n<td><span class=\"name\">Click\x3c/span>\x3c/td>\n<td>//span/button\x3c/td>\n<td># Use xpath selector strategy the element.\x3c/td>\n\x3c/tr>\n\x3c/table>\n<h4 id=\"Explicit selector strategy\">Explicit selector strategy\x3c/h4>\n<p>The explicit selector strategy is specified with a prefix using syntax <code>strategy=value\x3c/code>. Spaces around the separator are ignored, so <code>css=foo\x3c/code>, <code>css= foo\x3c/code> and <code>css = foo\x3c/code> are all equivalent.\x3c/p>\n<p>Selector strategies that are supported by default are listed in the table below.\x3c/p>\n<table border=\"1\">\n<tr>\n<th>Strategy\x3c/th>\n<th>Match based on\x3c/th>\n<th>Example\x3c/th>\n\x3c/tr>\n<tr>\n<td>css\x3c/td>\n<td>CSS selector.\x3c/td>\n<td><code>css=div#example\x3c/code>\x3c/td>\n\x3c/tr>\n<tr>\n<td>xpath\x3c/td>\n<td>XPath expression.\x3c/td>\n<td><code>xpath=//div[@id=\"example\"]\x3c/code>\x3c/td>\n\x3c/tr>\n<tr>\n<td>text\x3c/td>\n<td>Browser text engine.\x3c/td>\n<td><code>text=Login\x3c/code>\x3c/td>\n\x3c/tr>\n\x3c/table>","generated":"2020-06-25 16:46:56","inits":[],"keywords":[{"args":["selector: str"],"doc":"<p>Checks the checkbox identified by <code>selector\x3c/code>. If already checked does nothing\x3c/p>","matched":true,"name":"Check Checkbox","shortdoc":"Checks the checkbox identified by ``selector``. If already checked does nothing","tags":[]},{"args":["selector: str","expected: CheckboxState"],"doc":"<p>Verifies that checkbox <code>selector\x3c/code> is in state <code>expected\x3c/code>\x3c/p>","matched":true,"name":"Checkbox Should Be","shortdoc":"Verifies that checkbox ``selector`` is in state ``expected``","tags":[]},{"args":["selector: str"],"doc":"<p>Clicks the button identified by <code>selector\x3c/code>.\x3c/p>","matched":true,"name":"Click Button","shortdoc":"Clicks the button identified by ``selector``.","tags":[]},{"args":[],"doc":"<p>Closes the current browser.\x3c/p>","matched":true,"name":"Close Browser","shortdoc":"Closes the current browser.","tags":[]},{"args":[],"doc":"<p>Returns curent URL.\x3c/p>","matched":true,"name":"Get Url","shortdoc":"Returns curent URL.","tags":[]},{"args":["url: str"],"doc":"<p>Navigates the current browser tab to the provided <code>url\x3c/code>.\x3c/p>","matched":true,"name":"Go To","shortdoc":"Navigates the current browser tab to the provided ``url``.","tags":[]},{"args":["selector: str","text: str"],"doc":"<p>Types the given <code>text\x3c/code> into the text field identified by <code>selector\x3c/code>\x3c/p>","matched":true,"name":"Input Text","shortdoc":"Types the given ``text`` into the text field identified by ``selector``","tags":[]},{"args":["url: str"],"doc":"<p>Verifies that the current URL is exactly <code>url\x3c/code>.\x3c/p>","matched":true,"name":"Location Should Be","shortdoc":"Verifies that the current URL is exactly ``url``.","tags":[]},{"args":["browser=Chrome","url: NoneType=None"],"doc":"<p>Opens a new browser instance to the optional <code>url\x3c/code>. The <code>browser\x3c/code> argument specifies which browser to use. The supported browsers are listed in the table below. The browser names are case-insensitive and some browsers have multiple supported names.\x3c/p>\n<table border=\"1\">\n<tr>\n<th>Browser\x3c/th>\n<th>Name(s)\x3c/th>\n\x3c/tr>\n<tr>\n<td>Firefox\x3c/td>\n<td>firefox\x3c/td>\n\x3c/tr>\n<tr>\n<td>Google Chrome\x3c/td>\n<td>chrome\x3c/td>\n\x3c/tr>\n<tr>\n<td>WebKit\x3c/td>\n<td>webkit\x3c/td>\n\x3c/tr>\n\x3c/table>","matched":true,"name":"Open Browser","shortdoc":"Opens a new browser instance to the optional ``url``. The ``browser`` argument specifies which browser to use. The supported browsers are listed in the table below. The browser names are case-insensitive and some browsers have multiple supported names. | = Browser = | = Name(s) = | | Firefox | firefox | | Google Chrome | chrome | | WebKit | webkit |","tags":[]},{"args":["text: str"],"doc":"<p>Verifies that current page contains <code>text\x3c/code>.\x3c/p>","matched":true,"name":"Page Should Contain","shortdoc":"Verifies that current page contains ``text``.","tags":[]},{"args":["path: typing.Union[str, NoneType]=None"],"doc":"","matched":true,"name":"Take Page Screenshot","shortdoc":"","tags":[]},{"args":["selector: str","expected: str"],"doc":"<p>Verifies text field <code>selector\x3c/code> has exactly text <code>expected\x3c/code>.\x3c/p>","matched":true,"name":"Textfield Value Should Be","shortdoc":"Verifies text field ``selector`` has exactly text ``expected``.","tags":[]},{"args":["title: str"],"doc":"<p>Verifies that the current page title equals <code>title\x3c/code>\x3c/p>","matched":true,"name":"Title Should Be","shortdoc":"Verifies that the current page title equals ``title``","tags":[]},{"args":["selector: str"],"doc":"<p>Unchecks the checkbox identified by <code>selector\x3c/code>. If not checked does nothing\x3c/p>","matched":true,"name":"Uncheck Checkbox","shortdoc":"Unchecks the checkbox identified by ``selector``. If not checked does nothing","tags":[]}],"name":"Browser","named_args":true,"scope":"GLOBAL","version":"0.2.1"};
libdoc = {"all_tags":[],"contains_tags":false,"doc":"<p>Browser library is a web testing library for Robot Framework.\x3c/p>\n<p>This documents explains how to use keywords provided by the Browser library. For information about installation, support, and more, please visit the <a href=\"https://github.com/MarketSquare/robotframework-playwright\">project pages\x3c/a>. For more information about Robot Framework, see <a href=\"http://robotframework.org\">http://robotframework.org\x3c/a>.\x3c/p>\n<p>Browser library uses <a href=\"https://github.com/microsoft/playwright\">Playwright Node module\x3c/a> to automate <a href=\"https://www.chromium.org/Home\">Chromium\x3c/a>, <a href=\"https://www.mozilla.org/en-US/firefox/new/\">Firefox\x3c/a> and <a href=\"https://webkit.org/\">WebKit\x3c/a> with a single library.\x3c/p>\n<h3 id=\"Table of contents\">Table of contents\x3c/h3>\n<ul>\n<li><a href=\"#Locating%20elements\" class=\"name\">Locating elements\x3c/a>\x3c/li>\n<li><a href=\"#Shortcuts\" class=\"name\">Shortcuts\x3c/a>\x3c/li>\n<li><a href=\"#Keywords\" class=\"name\">Keywords\x3c/a>\x3c/li>\n\x3c/ul>\n<h2 id=\"Locating elements\">Locating elements\x3c/h2>\n<p>All keywords in Browser library that need to interact with an element on a web page take an argument typically named <code>selector\x3c/code> that specifies how to find the element.\x3c/p>\n<h3 id=\"Locator syntax\">Locator syntax\x3c/h3>\n<p>Browser library supports same selector strategies as the underlying Playwright node module: xpath, css, id and text. The strategy can either be explicitly specified with a prefix or the strategy can be implicit.\x3c/p>\n<h4 id=\"Implicit selector strategy\">Implicit selector strategy\x3c/h4>\n<h3 id=\"!!! THIS ISN'T IMPLEMENTED YET !!!\">!!! THIS ISN'T IMPLEMENTED YET !!!\x3c/h3>\n<p>The default selector strategy is <span class=\"name\">css\x3c/span>. If selector does not contain one of the know selector strategies, <span class=\"name\">css\x3c/span>, <span class=\"name\">xpath\x3c/span>, <span class=\"name\">id\x3c/span> or <span class=\"name\">text\x3c/span> it is assumed to contain css selector. Also <span class=\"name\">selectors\x3c/span> starting with <span class=\"name\">//\x3c/span> considered as xpath selectors.\x3c/p>\n<p>Examples:\x3c/p>\n<table border=\"1\">\n<tr>\n<td><span class=\"name\">Click\x3c/span>\x3c/td>\n<td>span &gt; button\x3c/td>\n<td># Use css selector strategy the element.\x3c/td>\n\x3c/tr>\n<tr>\n<td><span class=\"name\">Click\x3c/span>\x3c/td>\n<td>//span/button\x3c/td>\n<td># Use xpath selector strategy the element.\x3c/td>\n\x3c/tr>\n\x3c/table>\n<h4 id=\"Explicit selector strategy\">Explicit selector strategy\x3c/h4>\n<p>The explicit selector strategy is specified with a prefix using syntax <code>strategy=value\x3c/code>. Spaces around the separator are ignored, so <code>css=foo\x3c/code>, <code>css= foo\x3c/code> and <code>css = foo\x3c/code> are all equivalent.\x3c/p>\n<p>Selector strategies that are supported by default are listed in the table below.\x3c/p>\n<table border=\"1\">\n<tr>\n<th>Strategy\x3c/th>\n<th>Match based on\x3c/th>\n<th>Example\x3c/th>\n\x3c/tr>\n<tr>\n<td>css\x3c/td>\n<td>CSS selector.\x3c/td>\n<td><code>css=div#example\x3c/code>\x3c/td>\n\x3c/tr>\n<tr>\n<td>xpath\x3c/td>\n<td>XPath expression.\x3c/td>\n<td><code>xpath=//div[@id=\"example\"]\x3c/code>\x3c/td>\n\x3c/tr>\n<tr>\n<td>text\x3c/td>\n<td>Browser text engine.\x3c/td>\n<td><code>text=Login\x3c/code>\x3c/td>\n\x3c/tr>\n\x3c/table>","generated":"2020-06-26 11:56:29","inits":[],"keywords":[{"args":["selector: str"],"doc":"<p>Checks the checkbox identified by <code>selector\x3c/code>. If already checked does nothing\x3c/p>","matched":true,"name":"Check Checkbox","shortdoc":"Checks the checkbox identified by ``selector``. If already checked does nothing","tags":[]},{"args":["selector: str","expected: CheckboxState"],"doc":"<p>Verifies that checkbox <code>selector\x3c/code> is in state <code>expected\x3c/code>\x3c/p>","matched":true,"name":"Checkbox Should Be","shortdoc":"Verifies that checkbox ``selector`` is in state ``expected``","tags":[]},{"args":["selector: str"],"doc":"<p>Clicks the button identified by <code>selector\x3c/code>.\x3c/p>","matched":true,"name":"Click Button","shortdoc":"Clicks the button identified by ``selector``.","tags":[]},{"args":[],"doc":"<p>Closes the current browser.\x3c/p>","matched":true,"name":"Close Browser","shortdoc":"Closes the current browser.","tags":[]},{"args":[],"doc":"<p>Returns curent URL.\x3c/p>","matched":true,"name":"Get Url","shortdoc":"Returns curent URL.","tags":[]},{"args":["url: str"],"doc":"<p>Navigates the current browser tab to the provided <code>url\x3c/code>.\x3c/p>","matched":true,"name":"Go To","shortdoc":"Navigates the current browser tab to the provided ``url``.","tags":[]},{"args":["selector: str","text: str"],"doc":"<p>Types the given <code>text\x3c/code> into the text field identified by <code>selector\x3c/code>\x3c/p>","matched":true,"name":"Input Text","shortdoc":"Types the given ``text`` into the text field identified by ``selector``","tags":[]},{"args":["url: str"],"doc":"<p>Verifies that the current URL is exactly <code>url\x3c/code>.\x3c/p>","matched":true,"name":"Location Should Be","shortdoc":"Verifies that the current URL is exactly ``url``.","tags":[]},{"args":["browser=Chrome","url: NoneType=None"],"doc":"<p>Opens a new browser instance to the optional <code>url\x3c/code>. The <code>browser\x3c/code> argument specifies which browser to use. The supported browsers are listed in the table below. The browser names are case-insensitive and some browsers have multiple supported names.\x3c/p>\n<table border=\"1\">\n<tr>\n<th>Browser\x3c/th>\n<th>Name(s)\x3c/th>\n\x3c/tr>\n<tr>\n<td>Firefox\x3c/td>\n<td>firefox\x3c/td>\n\x3c/tr>\n<tr>\n<td>Google Chrome\x3c/td>\n<td>chrome\x3c/td>\n\x3c/tr>\n<tr>\n<td>WebKit\x3c/td>\n<td>webkit\x3c/td>\n\x3c/tr>\n\x3c/table>","matched":true,"name":"Open Browser","shortdoc":"Opens a new browser instance to the optional ``url``. The ``browser`` argument specifies which browser to use. The supported browsers are listed in the table below. The browser names are case-insensitive and some browsers have multiple supported names. | = Browser = | = Name(s) = | | Firefox | firefox | | Google Chrome | chrome | | WebKit | webkit |","tags":[]},{"args":["text: str"],"doc":"<p>Verifies that current page contains <code>text\x3c/code>.\x3c/p>","matched":true,"name":"Page Should Contain","shortdoc":"Verifies that current page contains ``text``.","tags":[]},{"args":["path: typing.Union[str, NoneType]=None"],"doc":"<p>Take screenshot of current browser state and saves it to path. By default saves to robot output dir\x3c/p>","matched":true,"name":"Take Page Screenshot","shortdoc":"Take screenshot of current browser state and saves it to path. By default saves to robot output dir","tags":[]},{"args":["selector: str","expected: str"],"doc":"<p>Verifies text field <code>selector\x3c/code> has exactly text <code>expected\x3c/code>.\x3c/p>","matched":true,"name":"Textfield Value Should Be","shortdoc":"Verifies text field ``selector`` has exactly text ``expected``.","tags":[]},{"args":["title: str"],"doc":"<p>Verifies that the current page title equals <code>title\x3c/code>\x3c/p>","matched":true,"name":"Title Should Be","shortdoc":"Verifies that the current page title equals ``title``","tags":[]},{"args":["selector: str"],"doc":"<p>Unchecks the checkbox identified by <code>selector\x3c/code>. If not checked does nothing\x3c/p>","matched":true,"name":"Uncheck Checkbox","shortdoc":"Unchecks the checkbox identified by ``selector``. If not checked does nothing","tags":[]}],"name":"Browser","named_args":true,"scope":"GLOBAL","version":"0.2.2"};
</script>
<title></title>
</head>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "robotframework-playwright",
"version": "0.2.1",
"version": "0.2.2",
"main": "index.ts",
"author": "Mikko Korpela <mikko.korpela@gmail.com>",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup_kwargs = {
'name': 'robotframework-browser',
'version': '0.2.1',
'version': '0.2.2',
'description': '',
'long_description': long_description,
'long_description_content_type': 'text/markdown',
Expand Down

0 comments on commit 94cea16

Please sign in to comment.