A simple datapool example

Source: Internet
Author: User

Description: Extracts data from datapool and writes the data to the open tablet one by one.

Preparations:

  • Use testmanager to create a datapool named test so that it contains three fields.
  • A project has been established.

Procedure:

  • Record the manual script.
  • Modify the manual script.

The content of test may be:

Karen 160585250 millersport hwy
Koganti 160585250 kings hwy
Clarence 160585250 5th St
Pam 160585250 Broadway
Izzy 160585250 Air Way
Gene 160585250 Blackstone Ave
Linsey 160585250 Wilshire Blvd
Napoleon 160585250 Larkspur landing CIR suite
Lester 160585250 Peck Rd
Norman 160585250 Crescent Ave

The modified script datapooldemo is:
'$ Include "sqautil. SBH"
Sub main
Dim result as integer
Dim sname as string
Dim sage as string
Dim saddress as string
Dim I as integer
Dim DP as long

Shell "C:/program files/Windows NT/accessories/wordpad.exe", 3
Dp = sqadatapoolopen ("test ")

Window setcontext, "caption = Document-WordPad ",""
Editbox click, "objectindex = 1", "coords = 54,23"
For I = 1 to 10
Call sqadatapoolfetch (DP)
Call sqadatapoolvalue (DP, 1, sname) 'dp-1 => sname
Call sqadatapoolvalue (DP, 2, SAGE) 'dp-2 => sage
Call sqadatapoolvalue (DP, 3, saddress) 'dp-3 => saddress
Inputkeys sname + "" + sage + "" + saddress + "{enter }"
Next I

Call sqadatapoolclose (DP)
End sub

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.