-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaddUser_test.py
More file actions
30 lines (21 loc) · 986 Bytes
/
addUser_test.py
File metadata and controls
30 lines (21 loc) · 986 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
26
27
28
29
30
from misc.credentials import USER_EMAIL, USER_PASS
from pages.loginPage import LoginPage
from misc.text import note
def addUserTest():
loginPage = LoginPage()
loginPage.setUp()
loginPage.setUserEmail(USER_EMAIL)
homePage = loginPage.setUserPass(USER_PASS)
assert homePage.getPageUrl() == 'https://www.linkedin.com/feed/'
assert homePage.getTradeMark()
# search up user and connect
resultPage = homePage.searchUser("Alison Dsa")
profilePage = resultPage.openProfile()
assert profilePage.getPageUrl() == 'https://www.linkedin.com/in/alisondsa/'
networkPage = profilePage.connectUser(note)
assert networkPage.getPageUrl() == 'https://www.linkedin.com/mynetwork/invite-sent/alisondsa/?isSendInvite=true'
# check for invitation status
profilePage = networkPage.viewProfile()
assert profilePage.getPageUrl() == 'https://www.linkedin.com/in/alisondsa/'
assert profilePage.getInvitationStatus() == 'Pending'
addUserTest()