SeeTest_See test 解决方法

I have a question regarding See Test - Desktop Automation. I've created a test, then exported the script as Python code, and copied it to Aptana Studio into the Project I've created. I seem to be getting 2 errors. Do you have any idea? Thanks in advance
Here is the code. I'm marking the error lines with * and ** :
import unittest
** from ExperitestClient import Client
class Test1(unittest.TestCase):
def setUp(self):
self.host = "localhost"
self.port = 8888
self.client = Client()
self.client.init(self.host, self.port)
self.client.setProjectBaseDirectory("C:Usersanaimanworkspaceproject3")
self.client.setReporter("xml", "reports")
def testTest1(self):
self.client.setApplicationTitle("Aurora TOUCH")
if(self.client.waitForElement("default", "Dashboard", 0, 10000)):
# If statement
* self.client.click("default", "Dashboard", 0, 1)
self.client.click("default", "Worklist", 0, 1)
if(self.client.waitForElement("default", "Enter Worklist", 0, 10000)):
# If statement
self.client.click("default", "Enter Worklist", 0, 1)
if(self.client.waitForElement("default", "Import", 0, 10000)):
# If statement
self.client.click("default", "Import", 0, 1)
if(self.client.isElementFound("default", "Back")):
# If statement
self.client.click("default", "Back", 0, 1)
self.client.verifyElementFound("default", "Sample Number")
self.client.click("default", "Sample Number", 0, 1)
self.client.sendText("0005")
self.client.sendText("{ENTER}")
self.client.verifyElementFound("Assay", "Campylobacter")
if(self.client.isElementFound("Assay", "CMV")):
# If statement
self.client.verifyElementFound("Assay", "Salmonella")
self.client.verifyElementFound("Assay", "EBV-IC")
self.client.click("Assay", "Campylobacter", 0, 1)
def tearDown(self):
self.client.generateReport()
if __name__ == '__main__':
unittest.main()
* Description Resource Path Location Type
Encountered "self" at line 22, column 9. Was expecting: "" ... Test.py /Aurora/src line 21 Problem
** Description Resource Path Location Type

Unresolved import: Client Test.py /Aurora/src line 6 PyDev Problem

Python Integration - Aptana Studio

Hi,
First let start with the Client import, your SeeTest installation directory contains clients clients/python directory, in this directory you will find ExperitestClient.py file.
Please add it to your project or copy it to the tests folder.
The secend issue is in the if statements. If you don't add content to the if just remove the 'if' statement.
Regards,
Support Team





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值