Testcomplete test devexpress Control

Source: Internet
Author: User
Tags testcomplete

A user recently asked for help, saying they are using
TC
Test a third party
Delphi
Widget
-Devexpress
Of
Expressnavbar
When encountering unrecognized and controllable problems.

 

The recording script is as follows:

Procedure Test2;


VaR
P1: olevariant;


VaR
W1: olevariant;


VaR
W2: olevariant;

Begin


P1
: = SYS. Process ('project1 ');


W1
: = P1.frm _ main;

 

W1.click (171, 17 );


W2
: = W1.dxnavbar1;

 

W2.click (94, 9 );

 

W2.click (48, 62 );

 

P1.window ('tmessageform', 'project1'). OK. clickbutton;

End;

 

You can see that the click coordinate of the control depends on the coordinate, so you need to modify the method as follows:

P: = SYS. Process ('project1'). vclobject ('frm _ main ');

 

Navbar: = SYS. Process ('project1'). vclobject ('frm _ main'). vclobject ('dxnavbar1 ');


//
Activate the Group first, and then call
Dxnavbar1linkclick
Event, input
Links
Object

 

Navbar. activegroup: = navbar. Groups. items [1];

 

P. dxnavbar1linkclick (nil, navbar. activegroup. Links [1]);


You can also directly input
Links
Object
,
However, this method cannot be displayed on the interface.
Group
Effect:

P. dxnavbar1linkclick (nil, navbar. Groups. items [0]. Links [0]);

 

 

 

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.