Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

selenium documentation python

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()
Comment

Selenium python

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys

browser = webdriver.Firefox()

browser.get('http://www.yahoo.com')

# Find the search box
elem = browser.find_element(By.NAME, 'p')
# Types seleniumhq and RETURN/ENTER
elem.send_keys('seleniumhq' + Keys.RETURN)

browser.quit()
Comment

PREVIOUS NEXT
Code Example
Python :: sample datafra,e PYTHON 
Python :: write number of lines in file python 
Python :: find angle mbc in python 
Python :: how to get current date in python 
Python :: scaling image interpolation python 
Python :: python index of last occurrence in string 
Python :: python - exchange rate API 
Python :: python change a key in a dictionary 
Python :: libreoffice add line in table 
Python :: The `.create()` method does not support writable nested fields by default. Write an explicit `.create()` method for serializer `room_api.serializers.roomSerializer`, or set `read_only=True` on nested serializer fields. 
Python :: how to check the type of a variable in python 
Python :: remove blanks from list python 
Python :: proper tree in data structure 
Python :: how to remove first letter of a string python 
Python :: creat and active python environment 
Python :: get time in ms python 
Python :: discord get user slash command 
Python :: pandas replace values with only whitespace to null 
Python :: boxplot label python 
Python :: Creating virtual environments 
Python :: python pandas series to dataframe 
Python :: facerecognizer python 
Python :: find first date python 
Python :: default ordering django 
Python :: gnome-shell turn off 
Python :: cyclically rotate an array by one 
Python :: plt.plot figure size 
Python :: First Unique Character in a String in python 
Python :: initialize an array in python 
Python :: python write list to file 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =