How to click on the popup menu after rightclick an item

2 posts, 0 answers
  1. lucia
    lucia avatar
    17 posts
    Member since:
    Jun 2011

    Posted 27 Mar 2014 Link to this post

        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.
  2. Ivaylo
    Ivaylo avatar
    749 posts

    Posted 02 Apr 2014 Link to this post

    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:


    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top