-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathperfunence.py
More file actions
27 lines (20 loc) · 916 Bytes
/
perfunence.py
File metadata and controls
27 lines (20 loc) · 916 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
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
#from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.by import By
import time
from selenium.webdriver.support.ui import WebDriverWait as web_wait
from selenium.webdriver.support import expected_conditions as EC
driver = webdriver.Chrome( service =Service(ChromeDriverManager().install()))
driver.get('https://perfumancebd.com/')
#xpath = '//*[@id="rig-adpr"]/div[1]/p[1]'
#title = web_wait(driver, 20).until(EC.presence_of_element_located((By.XPATH, xpath)))
#print(title.text)
listOfData = []
n = 9
for i in range(n):
xpath = '//*[@id="rig-adpr"]/div["+str(i)+"]/p[1]'
title = web_wait(driver, 20).until(EC.presence_of_element_located((By.XPATH, xpath)))
listOfData.append(title.text)
print("value of list", listOfData)