QWeb 3.4.1__tar.gz → 3.4.2__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.
Files changed (83) hide show
  1. {qweb-3.4.1 → qweb-3.4.2}/PKG-INFO +2 -3
  2. {qweb-3.4.1 → qweb-3.4.2}/QWeb/_version.py +3 -3
  3. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/frame.py +4 -4
  4. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/text.py +2 -0
  5. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/element.py +10 -4
  6. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/lists.py +1 -1
  7. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/table.py +21 -0
  8. {qweb-3.4.1 → qweb-3.4.2}/QWeb.egg-info/PKG-INFO +2 -3
  9. {qweb-3.4.1 → qweb-3.4.2}/README.md +1 -1
  10. {qweb-3.4.1 → qweb-3.4.2}/setup.py +0 -1
  11. {qweb-3.4.1 → qweb-3.4.2}/LICENSE +0 -0
  12. {qweb-3.4.1 → qweb-3.4.2}/MANIFEST.in +0 -0
  13. {qweb-3.4.1 → qweb-3.4.2}/QWeb/__init__.py +0 -0
  14. {qweb-3.4.1 → qweb-3.4.2}/QWeb/__main__.py +0 -0
  15. {qweb-3.4.1 → qweb-3.4.2}/QWeb/custom_config.py +0 -0
  16. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/__init__.py +0 -0
  17. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/actions.py +0 -0
  18. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/ajax.py +0 -0
  19. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/alert.py +0 -0
  20. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/blocks.py +0 -0
  21. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/browser/__init__.py +0 -0
  22. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/browser/android.py +0 -0
  23. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/browser/bs_desktop.py +0 -0
  24. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/browser/bs_mobile.py +0 -0
  25. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/browser/chrome.py +0 -0
  26. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/browser/edge.py +0 -0
  27. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/browser/firefox.py +0 -0
  28. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/browser/safari.py +0 -0
  29. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/checkbox.py +0 -0
  30. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/config.py +0 -0
  31. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/config_defaults.py +0 -0
  32. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/cookies.py +0 -0
  33. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/decorators.py +0 -0
  34. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/download.py +0 -0
  35. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/dragdrop.py +0 -0
  36. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/dropdown.py +0 -0
  37. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/element.py +0 -0
  38. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/exceptions.py +0 -0
  39. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/file.py +0 -0
  40. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/frame_checker.py +0 -0
  41. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/icon.py +0 -0
  42. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/input_.py +0 -0
  43. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/input_handler.py +0 -0
  44. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/javascript.py +0 -0
  45. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/lists.py +0 -0
  46. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/meas.py +0 -0
  47. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/platform.py +0 -0
  48. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/screenshot.py +0 -0
  49. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/search_strategy.py +0 -0
  50. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/secrets.py +0 -0
  51. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/table.py +0 -0
  52. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/user.py +0 -0
  53. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/util.py +0 -0
  54. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/window.py +0 -0
  55. {qweb-3.4.1 → qweb-3.4.2}/QWeb/internal/xhr.py +0 -0
  56. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/__init__.py +0 -0
  57. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/ajax.py +0 -0
  58. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/alert.py +0 -0
  59. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/blocks.py +0 -0
  60. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/browser.py +0 -0
  61. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/checkbox.py +0 -0
  62. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/config.py +0 -0
  63. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/cookies.py +0 -0
  64. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/debug.py +0 -0
  65. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/download.py +0 -0
  66. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/dragdrop.py +0 -0
  67. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/dropdown.py +0 -0
  68. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/file.py +0 -0
  69. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/frame.py +0 -0
  70. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/icon.py +0 -0
  71. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/input_.py +0 -0
  72. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/javascript.py +0 -0
  73. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/screenshot.py +0 -0
  74. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/search_strategy.py +0 -0
  75. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/text.py +0 -0
  76. {qweb-3.4.1 → qweb-3.4.2}/QWeb/keywords/window.py +0 -0
  77. {qweb-3.4.1 → qweb-3.4.2}/QWeb.egg-info/SOURCES.txt +0 -0
  78. {qweb-3.4.1 → qweb-3.4.2}/QWeb.egg-info/dependency_links.txt +0 -0
  79. {qweb-3.4.1 → qweb-3.4.2}/QWeb.egg-info/not-zip-safe +0 -0
  80. {qweb-3.4.1 → qweb-3.4.2}/QWeb.egg-info/requires.txt +0 -0
  81. {qweb-3.4.1 → qweb-3.4.2}/QWeb.egg-info/top_level.txt +0 -0
  82. {qweb-3.4.1 → qweb-3.4.2}/setup.cfg +0 -0
  83. {qweb-3.4.1 → qweb-3.4.2}/versioneer.py +0 -0
@@ -1,13 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: QWeb
3
- Version: 3.4.1
3
+ Version: 3.4.2
4
4
  Summary: Keyword driven automation for the web
5
5
  Home-page: https://github.com/qentinelqi/qweb/
6
6
  Author: Copado Inc.
7
7
  Author-email: copadorobotictesting@copado.com
8
8
  License: Apache License 2.0
9
9
  Keywords: test automation robot framework
10
- Classifier: Programming Language :: Python :: 3.8
11
10
  Classifier: Programming Language :: Python :: 3.9
12
11
  Classifier: Programming Language :: Python :: 3.10
13
12
  Classifier: Programming Language :: Python :: 3.11
@@ -99,7 +98,7 @@ See [examples](#examples).
99
98
 
100
99
  ---
101
100
  ## Requirements
102
- Python **3.8-3.11** and Robot Framework 4.1.3 or above.
101
+ Python **3.9-3.12** and Robot Framework 4.1.3 or above.
103
102
 
104
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).)
105
104
 
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2024-09-14T12:17:47+0300",
11
+ "date": "2024-10-23T13:39:11+0300",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "bf8ef0d847061c0b084705487e81805e23631af2",
15
- "version": "v3.4.1"
14
+ "full-revisionid": "04bc5d6d0ee82296341ec880141c7574d5e8110e",
15
+ "version": "v3.4.2"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -15,7 +15,7 @@
15
15
  # limitations under the License.
16
16
  # ---------------------------
17
17
  from __future__ import annotations
18
- from typing import Optional, Callable, Any, Union
18
+ from typing import Optional, Callable, Any, Union, List
19
19
  import os
20
20
  import time
21
21
  from functools import wraps
@@ -181,14 +181,14 @@ def all_frames(fn: Callable[..., Any]) -> Callable[..., Any]:
181
181
  """
182
182
 
183
183
  @wraps(fn)
184
- def wrapped(*args, **kwargs) -> Callable[..., Any]:
184
+ def wrapped(*args, **kwargs) -> Union[Callable[..., Any], List[Any], Any]:
185
185
  # Default behavior is not to continue searching
186
186
  continue_search = kwargs.get("continue_search", False)
187
187
 
188
188
  # pylint: disable=too-many-branches
189
189
  def search_from_frames(
190
190
  driver: Optional[WebDriver] = None, current_frame: Optional[WebElement] = None
191
- ) -> Callable[..., Any]:
191
+ ) -> Union[List[Any], Any]:
192
192
  # Initialize the list to store found elements if continue_search is True
193
193
  all_elements = []
194
194
  keep_frame = kwargs.get("stay_in_current_frame", CONFIG["StayInCurrentFrame"])
@@ -259,7 +259,7 @@ def all_frames(fn: Callable[..., Any]) -> Callable[..., Any]:
259
259
  driver: Optional[WebDriver] = None,
260
260
  current_frame: Union[Optional[WebElement], int] = None,
261
261
  parent_tree: list[Union[WebElement, int]] = [],
262
- ) -> Callable[..., Any]:
262
+ ) -> Union[List[Any], Any]:
263
263
  # Initialize the list to store found elements if continue_search is True
264
264
  all_elements = []
265
265
  keep_frame = kwargs.get("stay_in_current_frame", CONFIG["StayInCurrentFrame"])
@@ -408,6 +408,8 @@ def _get_item_by_css(text: str, **kwargs) -> Optional[list[WebElement]]:
408
408
  "a, span, img, li, h1, h2, h3, h4, h5, h6, div, svg, p, button, input"
409
409
  ':not([type="text"]):not([type="password"]):not([type="email"])'
410
410
  )
411
+ # get_elements_by_attributes already handles going through frames
412
+ kwargs["continue_search"] = False
411
413
  full, partial = element.get_elements_by_attributes(css, text, **kwargs)
412
414
  web_elements = element.get_visible_elements_from_elements(full + partial, **kwargs)
413
415
  if web_elements:
@@ -24,6 +24,7 @@ from selenium.webdriver.support.select import Select
24
24
  from robot.api.deco import keyword
25
25
  from QWeb.internal.exceptions import QWebValueError, QWebElementNotFoundError
26
26
  from QWeb.internal import element, decorators, actions, text, input_, dropdown, checkbox
27
+ from QWeb.internal.config_defaults import CONFIG
27
28
 
28
29
 
29
30
  @keyword(tags=["Interaction"])
@@ -65,7 +66,7 @@ def click_element(
65
66
  ----------
66
67
  xpath : str | selenium.webdriver.remote.webelement.WebElement
67
68
  Xpath expression with or without xpath= prefix. The equal sign "=" must be escaped
68
- with a "\".
69
+ with a "\\".
69
70
  Can also be a WebElement instance returned by GetWebElement keyword or javascript.
70
71
  timeout : int
71
72
  How long we wait before failing.
@@ -123,7 +124,7 @@ def right_click(
123
124
  ----------
124
125
  xpath : str
125
126
  Xpath expression with or without xpath= prefix. The equal sign "=" must be escaped
126
- with a "\".
127
+ with a "\\".
127
128
  timeout : int
128
129
  How long we wait before failing.
129
130
  index : int
@@ -170,7 +171,7 @@ def hover_element(
170
171
  ----------
171
172
  xpath : str | selenium.webdriver.remote.webelement.WebElement
172
173
  Xpath expression with or without xpath= prefix. The equal sign "=" must be escaped
173
- with a "\".
174
+ with a "\\".
174
175
  Can also be a WebElement instance returned by GetWebElement keyword or javascript.
175
176
  timeout : int
176
177
  How long we wait before failing.
@@ -229,7 +230,7 @@ def get_element_count(
229
230
  ----------
230
231
  locator : str
231
232
  Xpath or some attribute value of element. When using XPaths, the equal sign "=" must be
232
- escaped with a "\".
233
+ escaped with a "\\".
233
234
  timeout : str | int
234
235
  How long we try to find text before failing. Default 10 (seconds)
235
236
  Accepted kwargs:
@@ -351,6 +352,8 @@ def verify_element(xpath: str, timeout: Union[int, float, str] = 0, **kwargs) ->
351
352
  else:
352
353
  web_elements = element.get_webelements(xpath, **kwargs)
353
354
  if web_elements:
355
+ if CONFIG["SearchMode"]:
356
+ element.draw_borders(web_elements)
354
357
  return
355
358
  raise QWebElementNotFoundError("No matching element found")
356
359
 
@@ -620,6 +623,9 @@ def get_attribute(
620
623
  ----------------
621
624
  \`VerifyAttribute\`, \`VerifyElement\`
622
625
  """
626
+ # remove all_frames from kwargs if given. It's not supported by
627
+ # GetAttribute, but would give error later
628
+ kwargs.pop("all_frames", None)
623
629
  webelement = get_webelement(locator, anchor, element_type, timeout, all_frames=False, **kwargs)
624
630
 
625
631
  if not webelement:
@@ -72,7 +72,7 @@ def use_list(
72
72
  xpath can be used to locate correct list. If wanted list is multiple amount
73
73
  of whatever web elements with some common attribute, xpath can be used
74
74
  to select those elements. When using XPaths, the equal sign "=" must be
75
- escaped with a "\".
75
+ escaped with a "\\".
76
76
  anchor : str
77
77
  Index number or text near the locator element.
78
78
  If the page contains many places where the locator is then anchor is used
@@ -106,6 +106,8 @@ def verify_table(
106
106
  ) -> None:
107
107
  r"""Verify text in table coordinates.
108
108
 
109
+ A table must be focused with **UseTable** keyword before using this keyword.
110
+
109
111
  Reads cell value from **coordinates** in active table and verifies it
110
112
  against expected value.
111
113
 
@@ -138,6 +140,9 @@ def verify_table(
138
140
  --------
139
141
  .. code-block:: robotframework
140
142
 
143
+ # Activate table
144
+ UseTable MyTable
145
+
141
146
  # Verify that row 2 column 3 contains "jane.doe@example.com"
142
147
  # Header row is omitted
143
148
  VerifyTable r2c3 jane.doe@example.com
@@ -200,6 +205,8 @@ def get_cell_text(
200
205
  ) -> Union[str, int, float]:
201
206
  r"""Get cell text to variable.
202
207
 
208
+ A table must be focused with **UseTable** keyword before using this keyword.
209
+
203
210
  Locates cell by coordinates from active table and return value.
204
211
 
205
212
  **Coordinate format**:
@@ -229,6 +236,7 @@ def get_cell_text(
229
236
  --------
230
237
  .. code-block:: robotframework
231
238
 
239
+ UseTable MyTable
232
240
  ${value} GetCellText r2c3
233
241
  ${value} GetCellText r-2c5 #Row is second to last. Get value from cell c5
234
242
  ${value} GetCellText r?Robot/c5 #Row contains text Robot. Get value from cell c5
@@ -287,6 +295,9 @@ def click_cell(
287
295
  r"""Click table cell.
288
296
 
289
297
  Locates cell by coordinates or text from active table and clicks it.
298
+
299
+ A table must be focused with **UseTable** keyword before using this keyword.
300
+
290
301
  Note that by default click is sent to the cell element itself, so if you want
291
302
  to specify which child element is clicked, add tag argument.
292
303
 
@@ -318,6 +329,7 @@ def click_cell(
318
329
  --------
319
330
  .. code-block:: robotframework
320
331
 
332
+ UseTable MyTable
321
333
  ClickCell r2c3
322
334
  ClickCell r-1c-1 #Last row, last cell
323
335
  ClickCell r?SomeText/c3 #Click cell 3 in row that contains text SomeText
@@ -378,6 +390,8 @@ def get_table_row(
378
390
  ) -> Union[WebElement, int]:
379
391
  r"""Get row (index) from current table.
380
392
 
393
+ A table must be focused with **UseTable** keyword before using this keyword.
394
+
381
395
  Get table row number by some visible text or value. Returned value is index of row
382
396
  including first header row, unless argument **skip_header=True** is used.
383
397
 
@@ -385,6 +399,7 @@ def get_table_row(
385
399
  --------
386
400
  .. code-block:: robotframework
387
401
 
402
+ UseTable MyTable
388
403
  ${row} GetTableRow //last #returns table length(last row)
389
404
  ${row} GetTableRow Qentinel #return first row which contain text Qentinel
390
405
  ${row} GetTableRow Qentinel 2 #second row with text Qentinel
@@ -421,6 +436,8 @@ def get_table_row(
421
436
  def get_col_header_count() -> int:
422
437
  r"""Get Count of column headers in current active table.
423
438
 
439
+ A table must be focused with **UseTable** keyword before using this keyword.
440
+
424
441
  Note: only visible columns may be counted in some dynamic tables.
425
442
 
426
443
  Examples
@@ -449,6 +466,8 @@ def get_col_header_count() -> int:
449
466
  def get_col_header(index: Optional[int] = None) -> Union[str, List[str]]:
450
467
  r"""Get column header names/text as a list.
451
468
 
469
+ A table must be focused with **UseTable** keyword before using this keyword.
470
+
452
471
  Note: only visible columns may be counted in some dynamic tables.
453
472
 
454
473
  Note2: If column header has attribute 'aria-label', it's value is returned.
@@ -512,6 +531,8 @@ def get_col_header(index: Optional[int] = None) -> Union[str, List[str]]:
512
531
  def verify_col_header(expected: str, index: Optional[int] = None, **kwargs) -> bool:
513
532
  r"""Verifies that a column header with given index matches the expected text.
514
533
 
534
+ A table must be focused with **UseTable** keyword before using this keyword.
535
+
515
536
  Note: only visible columns may be counted in some dynamic tables.
516
537
 
517
538
  Note2: If column header has attribute 'aria-label', it's value is considered as expected value.
@@ -1,13 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: QWeb
3
- Version: 3.4.1
3
+ Version: 3.4.2
4
4
  Summary: Keyword driven automation for the web
5
5
  Home-page: https://github.com/qentinelqi/qweb/
6
6
  Author: Copado Inc.
7
7
  Author-email: copadorobotictesting@copado.com
8
8
  License: Apache License 2.0
9
9
  Keywords: test automation robot framework
10
- Classifier: Programming Language :: Python :: 3.8
11
10
  Classifier: Programming Language :: Python :: 3.9
12
11
  Classifier: Programming Language :: Python :: 3.10
13
12
  Classifier: Programming Language :: Python :: 3.11
@@ -99,7 +98,7 @@ See [examples](#examples).
99
98
 
100
99
  ---
101
100
  ## Requirements
102
- Python **3.8-3.11** and Robot Framework 4.1.3 or above.
101
+ Python **3.9-3.12** and Robot Framework 4.1.3 or above.
103
102
 
104
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).)
105
104
 
@@ -59,7 +59,7 @@ See [examples](#examples).
59
59
 
60
60
  ---
61
61
  ## Requirements
62
- Python **3.8-3.11** and Robot Framework 4.1.3 or above.
62
+ Python **3.9-3.12** and Robot Framework 4.1.3 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
 
@@ -30,7 +30,6 @@ setup(
30
30
  packages=find_packages(exclude=["*.test", "*.test.*", "test.*", "test"]),
31
31
 
32
32
  classifiers=[
33
- 'Programming Language :: Python :: 3.8',
34
33
  'Programming Language :: Python :: 3.9',
35
34
  'Programming Language :: Python :: 3.10',
36
35
  'Programming Language :: Python :: 3.11',
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