Calling to a Sikuli script from Python (Selenium) -


while running selenium tests on website, have flash elements cannot test selenium/python. wanted call out separate terminal window, run sikuli ocr tests, , selenium/python testing. i've not been able figure out exactly. put xxx not know arguments new terminal open , run sikuli script.

def test_05(self):         driver = self.driver         driver.get(self.base_url + "/")         driver.find_element_by_link_text("home").click()         driver.find_element_by_id("open_popup").click()         driver.find_element_by_id("screen_name").send_keys("user")         driver.find_element_by_id("password").send_keys("pwd")         driver.find_element_by_id("login_submit").click()         driver.find_element_by_id("button").click()         time.sleep(120)         os.system('xxx')         os.system('./sikuli/sikuli-script -r test.sikuli') 

i sure there couple items wrong here. appreciated. i've searched , read can find on already, can't work together.

i ran similar issue, wrote cpython module sikuli. module hosted on github , available via pip install sikuli. it's able access included sikuli jar using pyjnius, don't have use jython or install sikuli (although i'd recommend recording purposes). module covers of simpler sikuli functions, should cover lot of use cases.

after installing, simple from sikuli import * started, best practice, i'd suggest importing functions want use. particularly important module, because sikuli has type function overrides python's own type function.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -