Seetest_see Test Solution

Source: Internet
Author: 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", "GMM ")):
# 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/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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.