Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

selenium webdriver

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By

chrome_driver_path = Service(
    "C:Developmentchromedriver_win32chromedriver.exe")
driver = webdriver.Chrome(service=chrome_driver_path)
URL = "https://en.wikipedia.org/wiki/Main_Page"
driver.get(URL)

articles = driver.find_element(By.XPATH, '//*[@id="articlecount"]/a[1]')
print(articles.text)
driver.quit()
 
PREVIOUS NEXT
Tagged: #selenium #webdriver
ADD COMMENT
Topic
Name
5+6 =