You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class TestClass:
def test_a(self, page):
print("open site")
self.page = page
self.page.goto("https://microsoft.com")
def test_b(self, page):
print("check title of site")
self.page = page
page_title = self.page.title()#
assert page_title == "Microsoft - Official Home Page"
The question is - how can I run browser once for 2 tests? Sequence should be the following - browser is starting, test_a is executing, then test_b is executing, then browser is closing.
The text was updated successfully, but these errors were encountered:
I'll close it for now since this issue seems stale and didn't get enough upvotes in the past. Feel free to re-file if you still encounter issues. We usually recommend functions as tests. Thanks!
Hi!
I have the following code:
The question is - how can I run browser once for 2 tests? Sequence should be the following - browser is starting, test_a is executing, then test_b is executing, then browser is closing.
The text was updated successfully, but these errors were encountered: