QWeb 3.4.2__tar.gz → 3.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {qweb-3.4.2 → qweb-3.4.3}/PKG-INFO +4 -4
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/_version.py +3 -3
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/browser/chrome.py +1 -1
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/element.py +16 -12
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/input_.py +5 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/screenshot.py +1 -1
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/text.py +29 -1
- {qweb-3.4.2 → qweb-3.4.3}/QWeb.egg-info/PKG-INFO +4 -4
- {qweb-3.4.2 → qweb-3.4.3}/QWeb.egg-info/requires.txt +2 -2
- {qweb-3.4.2 → qweb-3.4.3}/README.md +1 -1
- {qweb-3.4.2 → qweb-3.4.3}/setup.py +2 -2
- {qweb-3.4.2 → qweb-3.4.3}/LICENSE +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/MANIFEST.in +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/__init__.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/__main__.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/custom_config.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/__init__.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/actions.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/ajax.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/alert.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/blocks.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/browser/__init__.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/browser/android.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/browser/bs_desktop.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/browser/bs_mobile.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/browser/edge.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/browser/firefox.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/browser/safari.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/checkbox.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/config.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/config_defaults.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/cookies.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/decorators.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/download.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/dragdrop.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/dropdown.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/exceptions.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/file.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/frame.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/frame_checker.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/icon.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/input_handler.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/javascript.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/lists.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/meas.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/platform.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/search_strategy.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/secrets.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/table.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/user.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/util.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/window.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/internal/xhr.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/__init__.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/ajax.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/alert.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/blocks.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/browser.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/checkbox.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/config.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/cookies.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/debug.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/download.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/dragdrop.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/dropdown.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/element.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/file.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/frame.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/icon.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/input_.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/javascript.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/lists.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/screenshot.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/search_strategy.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/table.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/text.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb/keywords/window.py +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb.egg-info/SOURCES.txt +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb.egg-info/dependency_links.txt +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb.egg-info/not-zip-safe +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/QWeb.egg-info/top_level.txt +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/setup.cfg +0 -0
- {qweb-3.4.2 → qweb-3.4.3}/versioneer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: QWeb
|
|
3
|
-
Version: 3.4.
|
|
3
|
+
Version: 3.4.3
|
|
4
4
|
Summary: Keyword driven automation for the web
|
|
5
5
|
Home-page: https://github.com/qentinelqi/qweb/
|
|
6
6
|
Author: Copado Inc.
|
|
@@ -22,9 +22,9 @@ Requires-Dist: pyscreeze==0.1.28
|
|
|
22
22
|
Requires-Dist: pyautogui>=0.9.53
|
|
23
23
|
Requires-Dist: pynput>=1.7.7
|
|
24
24
|
Requires-Dist: requests>=2.32.2
|
|
25
|
-
Requires-Dist: robotframework<8,>=
|
|
25
|
+
Requires-Dist: robotframework<8,>=5.0.1
|
|
26
26
|
Requires-Dist: robotframework-debuglibrary==2.5.0
|
|
27
|
-
Requires-Dist: selenium<5,>=4.
|
|
27
|
+
Requires-Dist: selenium<5,>=4.27.0
|
|
28
28
|
Requires-Dist: Pillow<11,>=10.3.0
|
|
29
29
|
Requires-Dist: scipy>=1.7.3
|
|
30
30
|
Requires-Dist: scikit-image==0.21; python_version == "3.8"
|
|
@@ -98,7 +98,7 @@ See [examples](#examples).
|
|
|
98
98
|
|
|
99
99
|
---
|
|
100
100
|
## Requirements
|
|
101
|
-
Python **3.9-3.12** and Robot Framework
|
|
101
|
+
Python **3.9-3.12** and Robot Framework 5.0.1 or above.
|
|
102
102
|
|
|
103
103
|
(Note that support on Macs with Apple based silicon (M1) requires MacOS version 12/Monterey or above or [custom installation](https://github.com/qentinelqi/qweb/blob/master/docs/qweb_mac_m1_installation.md).)
|
|
104
104
|
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2024-
|
|
11
|
+
"date": "2024-12-04T08:19:23+0200",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "v3.4.
|
|
14
|
+
"full-revisionid": "51efb194809e2f01e69ebc348dcc4f26eaaaa00f",
|
|
15
|
+
"version": "v3.4.3"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -158,6 +158,6 @@ def cache_browser_session(driver: WebDriver) -> None:
|
|
|
158
158
|
)
|
|
159
159
|
if browser_reuse_enabled:
|
|
160
160
|
dbg_address = driver.capabilities["goog:chromeOptions"]["debuggerAddress"]
|
|
161
|
-
write_browser_session_argsfile(dbg_address, driver.
|
|
161
|
+
write_browser_session_argsfile(dbg_address, driver.service.service_url) # type: ignore
|
|
162
162
|
BuiltIn().set_global_variable("${BROWSER_EXECUTOR_URL}", None)
|
|
163
163
|
BuiltIn().set_global_variable("${BROWSER_DEBUGGER_ADDRESS}", None)
|
|
@@ -642,22 +642,26 @@ def get_elements_by_attributes(
|
|
|
642
642
|
if "tag" in kwargs:
|
|
643
643
|
css = str(kwargs.get("tag"))
|
|
644
644
|
try:
|
|
645
|
-
|
|
646
|
-
if
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
645
|
+
xpath_search = css.startswith("xpath=") or css.startswith("//")
|
|
646
|
+
if not xpath_search:
|
|
647
|
+
elements = javascript.get_all_elements(css)
|
|
648
|
+
if any_element:
|
|
649
|
+
return elements
|
|
650
|
+
matches = javascript.get_by_attributes(
|
|
651
|
+
elements,
|
|
652
|
+
locator.replace("'", "\\'"), # type: ignore[union-attr]
|
|
653
|
+
partial,
|
|
654
|
+
)
|
|
655
|
+
else:
|
|
656
|
+
matches = {"full": [], "partial": []}
|
|
653
657
|
|
|
654
|
-
# try with xpath if no matches
|
|
655
|
-
# there have been few where css search doesn't work
|
|
656
|
-
# this is supported only if tag argument is given
|
|
658
|
+
# try with xpath if no matches and tag is givenor if css contains xpath
|
|
659
|
+
# there have been few cases where css search doesn't work
|
|
657
660
|
if len(matches.get("full", [])) == 0 and len(matches.get("partial", [])) == 0:
|
|
658
661
|
try:
|
|
662
|
+
xpath = css if xpath_search else f"//{css}"
|
|
659
663
|
driver = browser.get_current_browser()
|
|
660
|
-
elements = driver.find_elements(By.XPATH,
|
|
664
|
+
elements = driver.find_elements(By.XPATH, xpath)
|
|
661
665
|
|
|
662
666
|
matches = javascript.get_by_attributes(
|
|
663
667
|
elements,
|
|
@@ -184,6 +184,11 @@ def get_input_element_by_css_selector(
|
|
|
184
184
|
logger.debug("locator was text")
|
|
185
185
|
if "qweb_old" not in kwargs:
|
|
186
186
|
full_matches, partial_matches = get_input_elements_by_css(locator, **kwargs)
|
|
187
|
+
# backup search via xpath. This is needed due to javascript search not reaching
|
|
188
|
+
# all inputs under pseudo elements
|
|
189
|
+
if not full_matches and not partial_matches:
|
|
190
|
+
xpath = CONFIG["AllInputElements"]
|
|
191
|
+
full_matches, partial_matches = element.get_elements_by_attributes(xpath, locator)
|
|
187
192
|
|
|
188
193
|
if full_matches:
|
|
189
194
|
full_matches = text.filter_by_modal_ancestor(full_matches)
|
|
@@ -313,7 +313,7 @@ def chromium_full_screenshot(driver: WebDriver, filepath: str) -> str:
|
|
|
313
313
|
resource = f"/session/{driver.session_id}/chromium/send_command_and_get_result"
|
|
314
314
|
|
|
315
315
|
# pylint:disable=W0212
|
|
316
|
-
url = driver.
|
|
316
|
+
url = driver.service.service_url + resource
|
|
317
317
|
body = json.dumps({"cmd": cmd, "params": params})
|
|
318
318
|
response = driver.command_executor._request("POST", url, body)
|
|
319
319
|
return response.get("value")
|
|
@@ -361,7 +361,7 @@ def get_item_using_anchor(text: str, anchor: str, **kwargs) -> Optional[WebEleme
|
|
|
361
361
|
'@tooltip="{0}" or @aria-label="{0}" or @data-icon="{0}"]'.format(text)
|
|
362
362
|
)
|
|
363
363
|
if CONFIG["CssSelectors"]:
|
|
364
|
-
web_elements = _get_item_by_css(text, **kwargs)
|
|
364
|
+
web_elements = _get_item_by_css(text, **kwargs) or _get_item_by_xpath(text, **kwargs)
|
|
365
365
|
else:
|
|
366
366
|
web_elements = element.get_webelements(xpath, **kwargs)
|
|
367
367
|
# extend search to Shadow DOM
|
|
@@ -417,6 +417,34 @@ def _get_item_by_css(text: str, **kwargs) -> Optional[list[WebElement]]:
|
|
|
417
417
|
return None
|
|
418
418
|
|
|
419
419
|
|
|
420
|
+
def _get_item_by_xpath(text: str, **kwargs) -> Optional[list[WebElement]]:
|
|
421
|
+
"""
|
|
422
|
+
Backup search for finding items by attribute via xpath.
|
|
423
|
+
Needed in cases where there a slots that can't be pierced through
|
|
424
|
+
with javascript.
|
|
425
|
+
|
|
426
|
+
Allows partial match. Anchor has to be number.
|
|
427
|
+
:param text: str
|
|
428
|
+
Attribute value of the element
|
|
429
|
+
:return:
|
|
430
|
+
webelement that containing attribute with given value
|
|
431
|
+
"""
|
|
432
|
+
if "partial_match" not in kwargs:
|
|
433
|
+
kwargs["partial_match"] = True
|
|
434
|
+
xpath = (
|
|
435
|
+
"//a | //span | //img | //li | //h1 | //h2 | //h3 | //h4 | //h5 | //h6 | //div | //svg | "
|
|
436
|
+
"//p | //button | //input[not(@type='text') and not(@type='password') and "
|
|
437
|
+
"not(@type='email')]"
|
|
438
|
+
)
|
|
439
|
+
# get_elements_by_attributes already handles going through frames
|
|
440
|
+
kwargs["continue_search"] = False
|
|
441
|
+
full, partial = element.get_elements_by_attributes(xpath, text, **kwargs)
|
|
442
|
+
web_elements = element.get_visible_elements_from_elements(full + partial, **kwargs)
|
|
443
|
+
if web_elements:
|
|
444
|
+
return web_elements
|
|
445
|
+
return None
|
|
446
|
+
|
|
447
|
+
|
|
420
448
|
def _get_anchor_with_inner_text(
|
|
421
449
|
anchor_elements: list[WebElement], anchor: str, exact_match: bool = True
|
|
422
450
|
) -> Optional[WebElement]:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: QWeb
|
|
3
|
-
Version: 3.4.
|
|
3
|
+
Version: 3.4.3
|
|
4
4
|
Summary: Keyword driven automation for the web
|
|
5
5
|
Home-page: https://github.com/qentinelqi/qweb/
|
|
6
6
|
Author: Copado Inc.
|
|
@@ -22,9 +22,9 @@ Requires-Dist: pyscreeze==0.1.28
|
|
|
22
22
|
Requires-Dist: pyautogui>=0.9.53
|
|
23
23
|
Requires-Dist: pynput>=1.7.7
|
|
24
24
|
Requires-Dist: requests>=2.32.2
|
|
25
|
-
Requires-Dist: robotframework<8,>=
|
|
25
|
+
Requires-Dist: robotframework<8,>=5.0.1
|
|
26
26
|
Requires-Dist: robotframework-debuglibrary==2.5.0
|
|
27
|
-
Requires-Dist: selenium<5,>=4.
|
|
27
|
+
Requires-Dist: selenium<5,>=4.27.0
|
|
28
28
|
Requires-Dist: Pillow<11,>=10.3.0
|
|
29
29
|
Requires-Dist: scipy>=1.7.3
|
|
30
30
|
Requires-Dist: scikit-image==0.21; python_version == "3.8"
|
|
@@ -98,7 +98,7 @@ See [examples](#examples).
|
|
|
98
98
|
|
|
99
99
|
---
|
|
100
100
|
## Requirements
|
|
101
|
-
Python **3.9-3.12** and Robot Framework
|
|
101
|
+
Python **3.9-3.12** and Robot Framework 5.0.1 or above.
|
|
102
102
|
|
|
103
103
|
(Note that support on Macs with Apple based silicon (M1) requires MacOS version 12/Monterey or above or [custom installation](https://github.com/qentinelqi/qweb/blob/master/docs/qweb_mac_m1_installation.md).)
|
|
104
104
|
|
|
@@ -59,7 +59,7 @@ See [examples](#examples).
|
|
|
59
59
|
|
|
60
60
|
---
|
|
61
61
|
## Requirements
|
|
62
|
-
Python **3.9-3.12** and Robot Framework
|
|
62
|
+
Python **3.9-3.12** and Robot Framework 5.0.1 or above.
|
|
63
63
|
|
|
64
64
|
(Note that support on Macs with Apple based silicon (M1) requires MacOS version 12/Monterey or above or [custom installation](https://github.com/qentinelqi/qweb/blob/master/docs/qweb_mac_m1_installation.md).)
|
|
65
65
|
|
|
@@ -49,9 +49,9 @@ setup(
|
|
|
49
49
|
"pyautogui>=0.9.53",
|
|
50
50
|
"pynput>=1.7.7",
|
|
51
51
|
'requests>=2.32.2',
|
|
52
|
-
"robotframework>=
|
|
52
|
+
"robotframework>=5.0.1,<8",
|
|
53
53
|
"robotframework-debuglibrary==2.5.0",
|
|
54
|
-
"selenium>=4.
|
|
54
|
+
"selenium>=4.27.0,<5",
|
|
55
55
|
"Pillow>=10.3.0,<11",
|
|
56
56
|
"scipy>=1.7.3",
|
|
57
57
|
"scikit-image==0.21;python_version=='3.8'",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|