We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ba654f commit 5521c6dCopy full SHA for 5521c6d
tests/test_todo.py
@@ -1,4 +1,26 @@
1
+import pytest
2
from pylenium.driver import Pylenium
3
+from pylenium.element import Element, Elements
4
+
5
6
+class TodoPage:
7
+ def __init__(self, py: Pylenium):
8
+ self.py = py
9
10
+ def goto(self) -> 'TodoPage':
11
+ self.py.visit('https://lambdatest.github.io/sample-todo-app/')
12
+ return self
13
14
+ def get_todo_by_name(self, name: str) -> Element:
15
+ return self.py.getx(f"//*[text()='{name}']").parent()
16
17
+ def get_all_todos(self) -> Elements:
18
+ return self.py.find("li[ng-repeat*='todo']")
19
20
21
+@pytest.fixture
22
+def page(py: Pylenium):
23
+ return TodoPage(py).goto()
24
25
26
def test_check_first_item(py: Pylenium):
0 commit comments