-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirstsproject.py
More file actions
33 lines (28 loc) · 873 Bytes
/
Copy pathfirstsproject.py
File metadata and controls
33 lines (28 loc) · 873 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
31
32
from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
def chrome():
driver=webdriver.Chrome(executable_path="chromedriver.exe")
driver.get("https://www.facebook.com")
print(driver.title)
print(driver.current_url)
#with open('fb.txt','w')as f:
page_source=driver.page_source
#f.write(page_source)
time.sleep(7)
driver.close()
def IE():
driver=webdriver.Chrome(executable_path="chormedriver.exe")
driver.get("https://www.facebook.com")
print(driver.title)
print(driver.current_url)
page_source=driver.page_source
time.sleep(7)
driver.close()
def Firefox():
driver = webdriver.Chrome("E:\Python_Selenium\chormedriver.exe")
driver.get("https://www.facebook.com")
print(driver.title)
print(driver.current_url)
page_source = driver.page_source
chrome()