I am working on an editor where on any given String or token, when I do a right click, I get a menu with various option.
I am able to record the rcptt test for the scenario of doing a Right Click, then accessing the Menu and selecting an option.
But when I am replaying the case, the test fails as it does not find that particular String or token at that place and hence it does not get the menu on Right click.
How is it possible to record and replay an action performed at some particular location in the editor?
The recorded code:
get-editor Programs | get-table |
select [get-item -path "C:\\Users\\kaneezr\\Documents\\Full with job_Aug2015\\SOURCE\\CBSRC" -index 6] |
get-menu -path "Zoom Source" | click
with [get-editor AJCS1132 | get-table]
{
get-cell 61 1 | mouse down Right -count 1
get-cell 61 1 | mouse up Right -count 1
get-menu -path "Variable Where Used/All References" | click
}
It started working after I added the correct x and y co-ordinates of the element I wanted to do the right click upon.
with [get-editor AJCS1132 | get-table]
{
get-cell 84 1 | mouse down -button Right -x 200 -y 5
get-cell 84 1 | mouse up -button Right -x 200 -y 5
get-menu -path "Variable Where Used/All References" | click
}