← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #173217]: Problems running unit tests from Win7 command line

 

Question #173217 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/173217

surfdork posted a new comment:
RaiMan.

I apologize for wasting your time.  Thw problem was between chair and keyboard(me)
This works perfectly another one of the greatr improvements in Sikuli that I can include the direct path to the image source which is wy my inclusion of = did not affect the script.  Being able to declare a path to image makes coding in an ide really easy.   I will no longer need to use config files which are very tricky to mantain as I discovered.

Again, thank you and I apologize for wasting your time.

Another question is the XLRD module,

I've not found any code snippets for idiots to understand.  I have added the module to JJython and can invoke it however I dont understand the instructions.  All I want to learn how to do is open an excel spreadsheet and take the value from one cell in a column where the top cell is the header eg header is the passwords and the values below are the passswords.
Can you point me to a respource where something simple like this is explained?  

This is all I'v e been able to do

  xlrd.open_workbook('C:\\SikuliGMI\\TestPythonImport.xls')
    


from sikuli.Sikuli import *
import sys

popup("test")


login= '****'
ADlogin= '****'
PRODpw='*****'
password= '****'
firefox = 'C:\\Program Files (x86)\Mozilla Firefox\\firefox.exe'
ie9 = 'C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe'
INTHB='https://inthb.gmi-mr.com/'
PROD='https://hb.gmi-mr.com/'
setBundlePath = ("C:\\SikuliImages")
popup (PROD)
App.open(firefox)# create def() to launch all browsers
wait(5) #include visual assertuion later
type("l",KeyModifier.CTRL)# places focus in the address bar
#add code to expand browser window
#paste(PROD)#create def() to cover all sites
type(PROD)
wait(5)#add visual assertion later
type(Key.ENTER)
popup("begin visual assertion")
if exists(r'C:\\SikuliImages\\Eh.png', 10):
    type(Pattern('C:\\SikuliImages\\1325022795806.png').targetOffset(12,0), ADlogin)
    type (Key.ESC)#to clear the hover window if shown
    type (Key.TAB)#to move to next field
    type (PRODpw)
    wait(1) 
    click(Pattern('C:\\SikuliImages\\DefaultHBv.png').targetOffset(35,2))
    wait(1)
    click('C:\\SikuliImages\\Green.png')
    wait(2)
      click(Pattern('C:\\SikuliImages\\1325023103928.png').targetOffset(39,3))
else:
    popup("login page not displayed")
#make all of the above into a def() login
if exists('C:\\SikuliImages\\Hummhgbird.png', 10):
    popup ("successful login to the hummingbird page")
else:
    popup("hummingbird failed to launch")
    sys.exit()
if exists('C:\\SikuliImages\\1325037983959.png', 10):
    click(getLastMatch())
else:
    popup("feasability tab missing, exit test")
    sys.exit()
if exists('C:\\SikuliImages\\1325038638563.png'):
    click(getLastMatch())
else:
    popup("profilers sub tab missing, exit test")
    sys.exit()
if exists('C:\\SikuliImages\\BrowseProfil.png'):
    popup("Browser Profiler Attributes Displayed")
else:
    popup("Browser Profiler Missing, exit test")
sys.exit()

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.