Python Forum
Selenium Chromedriver Automation Help
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selenium Chromedriver Automation Help
#1
I'm fairly new to programing and have been trying my best to get a grasp of different concepts. I've made a few games and twitter bots, and am looking at trying some web scrapping/automation.

I have been following along with this tutorial https://www.youtube.com/watch?v=f7LEWxX4AVI
and have gotten stuck trying to enter text into the search bar. I'm using chrome Version 81.0.4044.129 and have the right Chromedriver to go with it.

This is my code from the tutorial -

from selenium import webdriver

driver = webdriver.Chrome()
driver.get('https://youtube.com')

searchbox = driver.find_element_by_xpath('//*[@id="search"]')
searchbox.send_keys('Type Type Type')

searchButton = driver.find_element_by_xpath('//*[@id="search-icon-legacy"]')
searchButton.click()

It opens up chrome but does not enter anything into the search bar
?
https://gyazo.com/68da5e2e2340265ae50125558ed8ed11

I get these errors that open in a new window
and I get these in my python shell

?
https://gyazo.com/e9d702ef1ec4e4bc422ae537a3b59fbe

any advice would be very much appreciated.

Thanks
Reply
#2
there's a scraping tutorial on this forum that covers selenium
web scraping part 1
web scraping part 2
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Selenium undetected Chromedriver Bot Laurin0000 1 4,061 Apr-13-2023, 09:20 PM
Last Post: Clixmaster
  enable flash using selenium chromedriver Fre3k 1 4,282 Nov-27-2020, 12:15 PM
Last Post: JellyCreeper6
  WebDriverException: 'chromedriver' executable needs to be in PATH pyzyx3qwerty 9 12,734 Jun-09-2020, 05:43 PM
Last Post: Yoriz
  not abel to run selenium automation one by one in loop DevilzKingz 5 2,151 Apr-25-2020, 07:35 PM
Last Post: Jeff900
  How to identify chromedriver version? metulburr 2 7,600 Jun-13-2019, 11:37 PM
Last Post: metulburr
  Chromedriver launch new tab gahhon 15 9,942 Feb-17-2019, 06:22 PM
Last Post: metulburr
  chromedriver.exe issue gahhon 2 2,809 Feb-12-2019, 12:09 PM
Last Post: metulburr
  Selenium chromedriver and click action Gilles95 4 13,276 Feb-07-2018, 07:28 PM
Last Post: Gilles95
  Error in Selenium: CRITICAL:root:Selenium module is not installed...Exiting program. AcszE 1 3,624 Nov-03-2017, 08:41 PM
Last Post: metulburr
  Python Selenium Document Lookup and Download Automation Error - Target Machine active Guttmann 4 5,206 Apr-18-2017, 12:13 AM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020