Sikuli automation to pull data from csv and enter in browser app
I am trying to automate application data entry into a application on firefox web browser using sikuli. I am pulling data from a csv and entering that data into a application gui on firefox web browser. My current sukili script is built but when I run it nothing happens it does not switch to the web browser and start the data entry from the csv. Any help would be appreciated. I'm missing something but I am not seeing it.
Below is my sikuli script
import csv
import sys
#######
# Config
#######
SFTPProfileCSV = 'C:/Users/
# browser='Windows Internet Explorer'
browser = 'Mozilla Firefox'
#What order the protocol is in, in the custom protocol list
orderOfCustomPr
timeBetweenScreens = 5 # How many seconds till the next screen draws
### Screen you should be on is Participants>
#######
# Basic / Keyboard functions
#######
def type_up(n):
while(n > 0):
n = n - 1
def type_down(n):
while(n > 0):
n = n - 1
def type_tab(n):
while(n > 0):
n = n - 1
def type_shift_tab(n):
while(n > 0):
n = n - 1
#######
# SIKULI SCREEN AUTOMATION
#######
def sfg_update_
switchApp(
#Get from the landing page on "Partners" screen to the "Edit Partner" screen
#We are required to have the partner filter box selected and empty
type_tab(3)
type(Key.ENTER)
sleep(
#Add Partner
type_tab(1)
type(Key.DOWN)
type_tab(1)
type(Key.ENTER)
sleep(
#Add Partner Information
type_tab(1)
paste(Producer)
type_tab(1)
paste(Producer)
type_tab(1)
paste(
type_tab(2)
paste(BU)
type_tab(3)
paste(NA)
type_tab(3)
paste(
type_tab(2)
type(Key.ENTER)
sleep(
#Add Partner User Account
type_tab(2)
paste(Producer)
type_tab(1)
paste(Password)
type_tab(1)
paste(Password)
type_tab(1)
type(Key.DOWN)
type_tab(2)
paste(Producer)
type_tab(1)
paste(Producer)
type_tab(2)
type(Key.ENTER)
sleep(
#Add Partner Partner Role
type_tab(1)
type(Key.Space)
type_tab(1)
type(Key.Space)
type_tab(2)
type(Key.ENTER)
#Finish Screens no changes
type_tab(3)
type(Key.ENTER)
type_tab(2)
type(Key.ENTER)
type_tab(3)
type(Key.ENTER)
#Close the edit community tab
type("w", Key.CTRL)
sleep(
#Get back to where we can paste the next partner
type_
#######
# MAIN
#######
def main():
RowStart = int(input("What row number in the FTP file \nshould I START with?"))
RowEnd = int(input("What row number in the FTP file \nshould I END with?"))
RowStart = RowStart -1 #CSVs are zero initialized but we're skipping the title row
# Open file for reading, as a text file = rU
# csvFileGuy = (open(SFTPProfi
profiles = []
with open(SFTPProfil
reader = csv.reader(
for row in reader:
# print(row)
for n in range(RowStart, RowEnd):
Producer = str(profiles[
Clientname = str(profiles[
BU = str(profiles[
Owneremail = str(profiles[
Password = str(profiles[
if __name__ == "__main__":
main()
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask DJ for more information if necessary.