-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_main_page.py
More file actions
25 lines (22 loc) · 844 Bytes
/
test_main_page.py
File metadata and controls
25 lines (22 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from selenium.common.exceptions import *
from .pages.main_page import MainPage
from .pages.login_page import LoginPage
from selenium import webdriver
import time
def test_guest_should_see_login_link(browser):
link = "http://selenium1py.pythonanywhere.com/catalogue/the-shellcoders-handbook_209?promo=midsummer"
page = MainPage(browser, link)
page.open()
page.should_be_login_link()
page.go_to_login_page()
page1 = LoginPage(browser,link)
page1.should_be_login_url()
page1.should_be_login_form()
page1.should_be_register_form()
def test_guest_can_go_to_login_page(browser):
link = "http://selenium1py.pythonanywhere.com"
page = MainPage(browser, link)
page.open()
page.go_to_login_page()
login_page = LoginPage(browser, browser.current_url)
login_page.should_be_login_page()