Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

open a web page using selenium python

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

driver = webdriver.Chrome('./chromedriver')
driver.get("https://www.python.org")
print(driver.title)
search_bar = driver.find_element_by_name("q")
search_bar.clear()
search_bar.send_keys("getting started with python")
search_bar.send_keys(Keys.RETURN)
print(driver.current_url)
driver.close()
Comment

how to open a website with selenium python

from selenium import webdriver

PATH = 'Path to web browser driver...'
driver = webdriver.Chrome(PATH) # Selenium also supports edge and firefox
driver.get("url to website")
Comment

PREVIOUS NEXT
Code Example
Python :: revesing case python 
Python :: django text area limit characters 
Python :: add empty column to dataframe pandas 
Python :: how to see if a proxy is up in python 
Python :: python split dict into chunks 
Python :: python list to string with spaces 
Python :: loading text file delimited by tab into pandas 
Python :: remove consecutive duplicates python 
Python :: jinja len is undefined 
Python :: python how to make a server 
Python :: python write csv line by line 
Python :: how to say hello world 
Python :: table python 
Python :: python check if all dictionary values are False 
Python :: add button to streamlit 
Python :: python named tuple 
Python :: fake migration 
Python :: pandas read excel nan 
Python :: seconds in a month 
Python :: how to calculate mean in python 
Python :: python get exception message 
Python :: save dataframe as csv 
Python :: directory name python 
Python :: calculate root mean square error python 
Python :: python list flatten 
Python :: change each line color as a rainbow python 
Python :: how to split image dataset into training and test set keras 
Python :: display entire row pandas 
Python :: download image python 
Python :: random choice without replacement python 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =