forked from aishwar18/Profile-Builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path(2)copy.py
24 lines (23 loc) · 899 Bytes
/
(2)copy.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
PATH="C:\Program Files (x86)\chromedriver.exe"
driver=webdriver.Chrome(PATH)
driver.maximize_window()
driver.get("http://127.0.0.1:8000/html/login")
uname=driver.find_elements_by_name("email")
uname[0].send_keys("[email protected]")
pwd=driver.find_elements_by_name("password")
pwd[0].send_keys("SEproject1")
link=driver.find_elements_by_class_name("login_button")
link[0].click()
name=driver.find_element_by_link_text("Dr. Bhagavathi Sivakumar P.")
name.click()
time.sleep(2)
copy=driver.find_element_by_xpath("//span[@role='button'][@data-original-title='Click to copy Email']")
copy.click()
time.sleep(3)
print("message is being displayed")
driver.quit()