Robot Frameworks - Click Element step passes, does not trigger action

394 Views Asked by At

I am having an issue, where I need to click on an element that opens up a menu. The click element step is successful; however the expected action is not triggered. I have added a Sleep statement, Wait Until Element Is Visible, and Set Selenium Speed to 1s. On the Log.html page I see the screen capture where the element I attempt to click is visible. The menu that I am trying to open is inside an iframe. Any help would be greatly appreciated.

`
*** Test Cases ***
Access Page
    Set Selenium Timeout        60
    Check Web Tier Enabled
    Sleep                       30
    Capture Page Screenshot

Open Widget
    Click Element               ${App_Components}
    Click Element               ${Widget_List}
    Sleep                       2
    Select Frame                ${iFrame}
    Sleep       5
    Capture Page Screenshot

Open Menu
        Wait Until Element Is Visible   ${Menu}
        Focus                           ${Menu}
        Mouse Over                      ${Menu}
        Sleep                           5
        Click Element                   ${Menu}  <--- this step is successful, but does not triger action
        Sleep                           5
        Capture Page Screenshot
`
1

There are 1 best solutions below

0
On

Found s solution to my problem, added this as a keyword.

Click Element Using JavaScript
   [Arguments]             ${xpath}
   ${var}=          Execute Javascript      var xPathRes = document.evaluate("${xpath}", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null); xPathRes.singleNodeValue.click();