Python Forum
Selenium to pick data from csv and enter into website
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selenium to pick data from csv and enter into website
#1
please give a runnable sampMy question, i have a csv file containing lots of data that needed to be enter into my office backend system.

All i need is there any article or video which is explaining that how pick data from csv and enter into website.

or any example that someone can show here will be helpful.

please if someone can explain it to me or to the community, it will be in benefit for all who are searching for samething over internet.
Reply
#2
Picking data from CSV: a. python CSV module
b. video tutorial - https://www.youtube.com/watch?v=q5uM4VKywbA

Selenium: read the documentation.

example script: It opens python-forum and searches a string.

from selenium import webdriver
search_query = 'hbknjr'
browser = webdriver.Chrome()        # alternatively: browser = webdriver.Chrome(pathtowebdriver)
browser.get("about:blank")
browser.get("https://python-forum.io/index.php")
search_textbox = browser.find_element_by_xpath('//*[@id="search"]/input[1]')   #XPATH can be found with developer tools in browsers
search_textbox.send_keys(search_query)
search_btn = browser.find_element_by_xpath('//*[@id="search"]/input[2]')
search_btn.click()
There are other ways to find an element and enter and manipulate data on a website, it'll be clear when you read the documentation.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help copying data from a website awere34a4e3 1 549 Nov-07-2023, 02:35 PM
Last Post: snippsat
  Python Selenium (Dropdown-) data Robin_at_Cantelli 2 6,157 Dec-29-2021, 03:16 AM
Last Post: ondreweil
  Scraping lender data from Ren Ren Dai website using Python. I will pay for that 200$ Hafedh_2021 1 2,723 May-18-2021, 08:41 PM
Last Post: snippsat
  How to get registeration data from a website that uses .aspx? Help me brothers. humble_coder 1 2,418 Feb-18-2021, 06:03 PM
Last Post: Larz60+
  Extract data with Selenium and BeautifulSoup nestor 3 3,816 Jun-06-2020, 01:34 AM
Last Post: Larz60+
  Clicking on element not triggering event in Selenium Python (Event Key is not in data dkaeloredo 2 4,230 Feb-16-2020, 05:50 AM
Last Post: dkaeloredo
  Scrapping javascript website with Selenium where pages randomly fail to load JuanJuan 14 7,056 Dec-27-2019, 12:32 PM
Last Post: JuanJuan
  Selenium get data from newly accessed page hoff1022 2 2,903 Oct-09-2019, 06:52 PM
Last Post: hoff1022
  How to Caputre Data After Selenium Scroll ahmedwaqas92 3 6,959 Aug-18-2019, 12:43 PM
Last Post: ahmedwaqas92
  Unable to access javaScript generated data with selenium and headless FireFox. pjn4 0 2,501 Aug-04-2019, 11:10 AM
Last Post: pjn4

Forum Jump:

User Panel Messages

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