Fix py-repl auto-generate=true (#910)

What is not tested is broken man_facepalming
Test&fix <py-repl auto-generate=true> which was broken by PR #884
This commit is contained in:
Antonio Cuni
2022-10-31 12:55:20 +01:00
committed by GitHub
parent 4c635fe84c
commit f67b8e0285
4 changed files with 58 additions and 0 deletions

View File

@@ -275,6 +275,15 @@ class PyScriptTest:
if wait_for_pyscript:
self.wait_for_pyscript()
def iter_locator(self, loc):
"""
Helper method to iterate over all the elements which are matched by a
locator, since playwright does not seem to support it natively.
"""
n = loc.count()
elems = [loc.nth(i) for i in range(n)]
return iter(elems)
# ============== Helpers and utility functions ==============