This is a migrated thread and some comments may be shown as answers.

How to click on the popup menu after rightclick an item

1 Answer 67 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
lucia
Top achievements
Rank 1
lucia asked on 28 Mar 2014, 04:47 AM
Hi,
    I am trying to implement the automation for a wps application. But encounter an issue that I can not click the item on the popup menu whick appears after rightclick an item.
    Below is my script:
          wpfApp.Manager.ActiveApplication.MainWindow.Find.ByTextContent("专题列表").User.Click(MouseClickType.RightClick, 250, 77, OffsetReference.TopLeftCorner, ActionPointUnitType.Percentage, ((System.Windows.Forms.Keys)(0)));
    After this step, I will click the item "添加专题" like below statement
          wpfApp.Manager.ActiveApplication.MainWindow.Find.ByTextContent("添加专题").User.Click(MouseClickType.LeftDown, 70, 29, ArtOfTest.Common.OffsetReference.TopLeftCorner,ActionPointUnitType.Percentage,((System.Windows.Forms.Keys)(0)));
    But it is failed. the item "添加专题" can not be clicked.

1 Answer, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 02 Apr 2014, 06:51 AM
Hello Lucia,

I am sorry you are experiencing this problem. 

As for the second step where you are clicking the item please try the following code instead:

wpfApp.Manager.ActiveApplication.MainWindow.Find.ByTextContent("添加专题").User.Click();


Regards,
Ivaylo
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
lucia
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
Share this question
or