SeeTest_See test 解决方法
来源:互联网 发布:腾讯内部员工网络 编辑:程序博客网 时间:2024/05/29 10:11
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
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
- SeeTest_See test 解决方法
- SeeTest_See test代码在QTP中运行(1)
- Basic XLib functionality test failed! 解决方法
- class-dump -H test.decrypted -o test不能导出头文件的解决方法
- 一道微软的Mini-Test笔试题 解决方法。
- QTP:General Error while saving the test 的解决方法
- VS不能启动web test recorder的解决方法
- Unit Test Bundle' in SDK 'iOS 8.1 解决方法
- # (vish-4014) No objects found matching '/test/*'解决方法。
- test
- test
- test
- test
- test
- test
- test
- Test
- test
- JAVA中使用FTPClient实现文件上传下载
- unity3d 在gui上绘制序列帧
- 设计模式C++实现(5)——原型模式、模板方法模式
- 设计模式C++实现(6)——建造者模式
- PHP+Ajax实现表单验证
- SeeTest_See test 解决方法
- valgrind 的使用简介
- windows8 开发教程 教你制作 多点触控Helper可将任意容器内任意对象进行多点缩放
- android 在listview上的 gallery 禁止上下滑动
- 《一步一脚印 90后程序员》9
- 排序算法05:归并排序
- .NET设计模式之抽象工厂模式(Abstract Factory)
- LATCH HA
- 浅析MySql二进制日志的应用