Answers for "how to open a website with selenium python"

0

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()
Posted by: Guest on November-21-2020
1

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")
Posted by: Guest on September-07-2021

Code answers related to "how to open a website with selenium python"

Python Answers by Framework

Browse Popular Code Answers by Language