I'd use Python, AppRobotic, and Selenium together. You'd have tight integration with Excel/CSV and anything else on Windows by leveraging Python and AppRobotic, and then import 'webbrowser' in Python, or just launch a browser with AppRobotic or Selenium.
Here's a quick example without Selenium, but adding it in and searching for textfields/buttons/etc by XPath/ID/Name identifiers would make your automation even more reliable:
import win32com.client
x = win32com.client.Dispatch("AppRobotic.API")
import webbrowser
myExcel = win32com.client.Dispatch('Excel.Application')
myExcel.Visible=True
# path to Excel file
myWorkbook = myExcel.Workbooks.Open('C:\\Users\\myUser\\Desktop\\companies.xlsx',ReadOnly=True)
# specify Excel sheet name
myWorksheet = myWorkbook.Sheets('Sheet1')
# count rows
myRange = str(myWorksheet.UsedRange.Rows.Count)
myData = myExcel.Range("A1:A"+myRange)
# loop through rows, print the result to Log Printout, and perform macro steps
for companyName in myData:
if companyName is not None:
# convert company name to string
companyName = str(companyName)
# keep track of company names in Log Printout app
x.Print(companyName)
# open with default browser
webbrowser.open_new('https://www.google.com')
# wait a bit for page to open
x.Wait(3000)
# use UI Item Explorer to get X,Y coordinates of Search box
x.MoveCursor(438, 435)
# click inside Search box
x.MouseLeftClick
# parameterize this with a cell value from Excel/CSV file
# x.Type("AppRobotic CEO Linkedin")
x.Type(companyName + " CEO Linkedin")
x.Type("{ENTER}")