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]);