SeeTest_See test 解決方案

來源:互聯網
上載者:User

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.