sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #12316
[Question #204897]: Use Sikuli to run selemium script
New question #204897 on Sikuli:
https://answers.launchpad.net/sikuli/+question/204897
OS: Win7 , python27, jython2.5.3b1,sikuli1.0rc3
I use java to run selenium-server.jar
I use selemium-ide to recorder script and save as python language for RC
ttt.py
###################################
from selenium import selenium
import unittest, time, re
class ttt(unittest.TestCase):
def setUp(self):
self.verificationErrors = []
self.selenium = selenium("localhost", 4444, "*chrome", "http://www.google.com.tw/")
self.selenium.start()
def test_ttt(self):
sel = self.selenium
sel.open("/")
sel.type("id=lst-ib", "1234")
sel.click("name=btnK")
try: self.failUnless(sel.is_text_present(u"123(1234)"))
except AssertionError, e: self.verificationErrors.append(str(e))
print("Pass")
def tearDown(self):
self.selenium.stop()
self.assertEqual([], self.verificationErrors)
if __name__ == "__main__":
unittest.main()
###################################
If use sikuli to run ttt.py, it's work fine.
I use other py to call ttt.py, it's error
other py file is use command: ttt.ttt(unittest.TestCase)
Error message:
TypeError: getattr():attribute name must be string
Command type error? how to call ttt.py ?
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.