qweb

Keyword driven automation for the web

APACHE-2.0 License

Downloads
14.4K
Stars
38
Committers
13

Bot releases are visible (Hide)

qweb - [2.0.0rc1] - 2022-03-10

Published by tkoukkari over 2 years ago

Changes:

  • Moved to Selenium 4. Selenium 3 is no longer supported
  • Ended support for Python 3.6
  • Added support for Python 3.10
  • Improved support for M1 Macs (should work directly via pip if you have the latest OS version)
  • Enhanced Shadow DOM support
  • Improved documentation for different configurations (SetConfig)
  • Added ability to change highlight color
  • All dependencies updated to later versions

Enhanced Shadow DOM support
There has been more and more cases where some (or all) elements are under shadow dom. These have been reachable via javascript only. However, it usually results hard-to-maintain test scripts like this:

GoTo                       chrome://settings/content/popups
${enable_popups_btn}=      Set Variable    document.querySelector("settings-ui").shadowRoot.querySelector("settings-main").shadowRoot.querySelector("settings-basic-page").shadowRoot.querySelector("div#basicPage").querySelector("[page-title='Privacy and security'] > settings-privacy-page").shadowRoot.querySelector("settings-animated-pages > settings-subpage > settings-category-default-radio-group").shadowRoot.querySelector("[id=radioSection] > settings-radio-group > settings-collapse-radio-button").shadowRoot.querySelector("[id=radioCollapse] > [id=button]")
ExecuteJavascript          ${enable_popups_btn}.click()

...which are prone to break if the DOM structure changes at all.

We have now added enhanced Shadow DOM support for all keywords that handle textual locators (*Text), inputs (*Input) or attribute value locators (*Item). At least for now we have this under a feature flag/setting, because old test cases might potentially suddenly find more elements than before.
As an example, the above test case can be re-written in a more clear way using the new feature:

SetConfig            ShadowDOM            True  # extends search to shadow dom elements
GoTo                 chrome://settings/content/popups
ClickText            Sites can send pop-ups 

More examples can be found for example in our tests here:
https://github.com/qentinelqi/qweb/blob/master/test/acceptance/shadow_dom.robot

Highlight color

There have been few cases where it would be useful to easily identify which of the duplicated elements QWeb finds. You can do this by changing the highlight color.

Example:

VerifyItem             text                anchor=2     # highlight element using default color (blue)
SetConfig              HighlightColor      orange
VerifyItem             text                anchor=Local Target in Shadow DOM 

image

qweb - 1.2.5

Published by tkoukkari over 2 years ago

[1.2.5] - 2022-02-02

Fixed

  • Fixed issue #53

Changed

  • Bumped Pillow to verson 9.0.0
  • Clarified SetConfig/SearchDirection docs
qweb - 1.2.4

Published by tkoukkari almost 3 years ago

[1.2.4] - 2022-01-10

Fixed

  • Fixed rare issue of getting AttributeError: 'NoneType' object has no attribute 'get' on Firefox
qweb - 1.2.3

Published by tkoukkari almost 3 years ago

[1.2.3] - 2021-11-25

Added

Changed

  • Updated documentation of GetPDFText and GetFileText
  • Changed IsModalXpath to enforce timeouts

Fixed

  • Fixed SetConfig CaseInsensitive
qweb - [1.2.2] - 2021-11-03

Published by tkoukkari almost 3 years ago

Minor bug fix release. No functional changes, only limits these dependencies:

  • Selenium locked to version 3.141.0
  • opencv-python locked to version 4.5.3.56

... and documentation updates.

Selenium 4 support will be coming in later releases.

qweb - [1.2.1] - 2021-10-20

Published by tkoukkari almost 3 years ago

Added

  • Configuration option IsModalXpath to limit text based search to elements under specific (modal) element
  • Keywords IsItem and IsNoItem
  • Added excludeSwitches option to Edge & Chrome, should not log all sorts of unnecessary things to console
  • Added --no-sandbox option when Edge is run in docker

Fixed

  • LogPage keyword
  • Fixed: example in ClickText documentation does not display correctly

Changed

  • Security update to OpenCV dependency
  • Imported functions that are not keywords removed from documentation
  • Clarified ExcpectFileDownload documentation
qweb - [1.2.0] - 2021-09-30

Published by tkoukkari about 3 years ago

Added

  • Support for Edge in Linux & Mac
  • Support for Retina displays to Icon* keywords
  • Tags to keyword documentation
  • SwitchBrowser keyword
  • Forward keyword
  • Description how to get QWeb working on Apple M1 silicon
  • Edge added as testing target to pipeline

Fixed

  • Icon keywords should be (less) resolution dependent. Scaling to different resolutions improved
  • Import error in Ubuntu if tkinter dependencies are not fulfilled now produces visible instructions
  • "\" characters not escapted correctly in keyword documentation

Changed

  • Security update to Pillow dependency
  • Minor change on dropdown search order as Firefox was behaving differently than other browsers
qweb - 1.1.0

Published by tkoukkari about 3 years ago

[1.1.0] - 2021-09-01

Fixed

  • Fixed rare timeout issue when reload happens while searching for frames. This happened from time to time especially with Firefox.

Changed

  • TypeText, HoverElement, ClickElement and VerifyInputValue now optionally take a WebElement instance as a locator.
  • Added deprecation warning to ScanClick and SkimClick
  • Added "click" argument description to TypeText docstring
  • Multiselection dropdown support with adding argument "unselect=True" to DropDown
  • Multiselection support to GetSelected too. If there are multiple options selected, each selection will be separated by comma (,)
  • Added argument header_only to VerifyLinks. Even if header and get normally return the same status, server can be configured to return different code from header.
  • RunBefore made public and modified to accept Robot Framework syntax
  • Added Related Keywords section to documentation for most keywords

Examples

Example 1 - Using WebElement as a locator

Accepting pre-fetched WebElement instance for certain keywords helps for example working with shadow doms. You can get the element using javascript (or GetWebElement if not under shadow dom) and use the returned webelement as locator to other keywords:

OpenBrowser             chrome://downloads     chrome
TypeText                Search downloads         test    # This will fail as element is under shadow dom

# Get element using javascript instead and use that as a locator for TypeText
ExecuteJavascript       return document.querySelector("downloads-manager").shadowRoot.querySelector("#toolbar").shadowRoot.querySelector("#toolbar").shadowRoot.querySelector("#searc 
h").shadowRoot.querySelector("#searchInput");   $shadow
TypeText                ${shadow}            You can't write here normally!!!

Example 2 - Unselect in multiselect dropdowns

You can unselect selected value(s) from multiselection dropdown using unselect=True argument:

Dropdown Canis Collie unselect=True

GetSelected returns all selected values as well, not just the latest selected value.

Example 3 - RunBefore

RunBefore can be used to run a (custom) keyword before interaction keywords (click*, get_text, dropdown). It's useful in applications where page is fully loaded but certain element like table is still fetching data and a custom spinner / load indicator is displayed.

# Robot Framework syntax, needs to be in variable
${run_bf}=   SetVariable    VerifyNoText    Loading....     timeout=5
SetConfig    RunBefore      ${run_bf}
ClickText    Foo
# Waits that text "Loading..." disappears before clicking text Foo

See keyword documentation for more examples.

qweb - 1.0.6

Published by tkoukkari over 3 years ago

Changed

  • Fixed TypeSecret not working on debugger under RFW 4.x
  • Changed SearchMode default value to "Draw". Blue rectangle is now by default drawn over found elements
qweb - 1.0.5

Published by tkoukkari over 3 years ago

[1.0.5] - 2021-06-16

Added

  • Acceptance tests for multiple clickable elements in a cell
  • Added keywords GetAttribute and VerifyAttribute

Changed

  • Updates for ClickCell keyword: checks for index value and more descriptive documentation
  • Fixed DoubleClick argument usage consistency between keywords
  • Fixed "ClearKey" not being reset when using ResetConfig
  • Fixed ClickIcon not overriding image on newer linux/scrot versions
  • Fixed VerifyTextCount not failing when text is not found at all
qweb - 1.0.4

Published by tkoukkari over 3 years ago

[1.0.4] - 2021-05-24

Added

  • Added argument 'anchor_type'. This can be set to 'text' if all numeric values in anchors should be handled as textual anchors and not as indices.
  • Added keywords GetUrl and VerifyUrl
  • Added keywords GetTitle and VerifyTitle
  • Added keyword Back

Changed

  • Fixed / changed how profiles are handled with Firefox
  • Added DoubleClick to SetConfig/ClickText/ClickElement documentation

https://pypi.org/project/QWeb/1.0.4/

qweb - Robot Framework 4.x support

Published by tkoukkari over 3 years ago

Added

  • Robot FW 4.x support and pipeline
  • Added Robot FW 4.x support to setup.py
  • Added duty file for local development tasks
  • Added 'pylint' back to pipeline

Changed

  • Fixed issue #6: added argument 'normalize' to verifypdftext/verifyfiletext
  • Fixed copyright message on unit tests
  • Updated keyword documentation to new RFW 4.x format
qweb - Python 3.9 Support

Published by tkoukkari over 3 years ago

Added Python 3.9 support

Package Rankings
Top 10.92% on Pypi.org
Badges
Extracted from project README
Tested with Slack
Related Projects