Calculator an addition calculation, and the actual value, the test result output, eventually imported to the local

Source: Internet
Author: User

' Calculator An addition calculation, and will the actual value, the test result output, eventually imported to the local

Dim I

Dim input

Dim Expertvalue,actualvalue

DataTable. Importsheet"C:\Users\Administrator\Desktop\UFT activity lecture material \ Addition Operation Case.xlsx","Sheet1","Action1"

' Wait 3

Systemutil. Run"C:\Windows\System32\calc.exe"

For I=1To the DataTable. Getsheet("Action1"). GetRowCount

Input=datatable. Value("Input","Action1")

Window(Calculator). Winbutton(C). Click

Window(Calculator). Winbutton(Input). Click

Window(Calculator). Winbutton("+"). Click

Window(Calculator). Winbutton("2"). Click

Window(Calculator). Winbutton("="). Click

Expertvalue=datatable. Value("Expertvalue","Action1")

Actualvalue= Window(Calculator). Static("9"). Getroproperty("Text")

If Expertvalue=actualvalueThen

Reporter. ReportEvent Micpass,"One number added result",Success

DataTable. Value("Actualvalue","Action1") =actualvalue

DataTable. Value("Status","Action1")="Pass"

Else

Reporter. ReportEvent Micfail,"One number added result",Failed

DataTable. Value("Actualvalue","Action1") =actualvalue

DataTable. Value ( "Action1" Span style= "color: #000000;" >)  =
    end if

    datatable. Getsheet (). Setnextrow

next

Window ( "calculator"
DataTable. Exportsheet  "Action1"

Calculator An addition calculation, and the actual value, the test results output, and finally imported to the local

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.