Skip to main content



      Home
Home » Eclipse Projects » RCP Testing Tool » right click not being recorded correctly
right click not being recorded correctly [message #1769882] Fri, 04 August 2017 09:06 Go to next message
Eclipse UserFriend
Hi,
i find that whether i do right click or left click, there is no difference in the way it is being recorded. Can i modify the ecl script to say it is right click?
Re: right click not being recorded correctly [message #1770067 is a reply to message #1769882] Tue, 08 August 2017 01:51 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ravi,

For what purpose do you want to use right click? RCPTT has 'get-menu' command to open the context menu (which can be opened by right click too).
Also, there are some 'mouse' commands, that have 'button' attribute. You can find the description in ECL documentation:
https://hudson.eclipse.org/rcptt/job/rcptt-all/ws/releng/doc/target/doc/ecl/index.html#mouse
Re: right click not being recorded correctly [message #1770151 is a reply to message #1770067] Tue, 08 August 2017 11:56 Go to previous messageGo to next message
Eclipse UserFriend
Hi Viktoria,
Here is a sample script that highlights the issue..The AUT is an Eclipse RCP application
A project consists of different tasks which can be created using a context menu that gets accessed when the right mouse button is clicked on the
project. One of the option is Rename, and I use this to show the issue. during the record, it renames it. during replay, it says get-menu does not
have "Rename"



get-menu -path "Projects/New Project" | click //here i create a new project
with [get-window "New Project"] {
get-editbox -after [get-label "Project Name:"] | set-text testProject // set the name of the project
get-button OK | click
}
with [get-view "Projects" | get-tree] {
get-item -path test | click
get-item -path test | click
select testProject | get-menu -path Rename | click // right click to get the Rename option and rename the project
// during re-run, this gives an error
// The Menu "[Rename]" could not be found. at get-menu
get-editbox | set-text testProject2 // rename the project
}
get-view "Projects" | get-tree | get-item -path testProject2 | get-property caption | equals testProject2 | verify-true //doesn't even reach here

Re: right click not being recorded correctly [message #1770152 is a reply to message #1770151] Tue, 08 August 2017 11:59 Go to previous messageGo to next message
Eclipse UserFriend
get-item -path test | click
is the line that gets recorded irrespective of whether it is a right click or a left. during replay, the get-menu is simply []
Re: right click not being recorded correctly [message #1770197 is a reply to message #1770152] Wed, 09 August 2017 00:24 Go to previous messageGo to next message
Eclipse UserFriend
On RCPTT side a 'get-menu' command fires a MenuDetect event.
So, you may add a 'mouse down' call before 'get-menu' call to ECL script:
select testProject | mouse down -button Right
select testProject | get-menu -path Rename | click

We cannot call MouseDown and MenuDetect both at the same time, because it may lead to the situations when the menu will be shown during replay and we cannot hide it.
Re: right click not being recorded correctly [message #1770376 is a reply to message #1770197] Thu, 10 August 2017 09:42 Go to previous messageGo to next message
Eclipse UserFriend
Thanks a lot Viktoria. That works..
Re: right click not being recorded correctly [message #1836587 is a reply to message #1770067] Fri, 08 January 2021 03:40 Go to previous message
Eclipse UserFriend
Viktoria Dlugopolskaya wrote on Tue, 08 August 2017 05:51
RCPTT has 'get-menu' command to open the context menu (which can be opened by right click too).


Can you point me to the documentation? I can't find it.
Previous Topic:Unable to launch ACMFg toolkit as extension of Eclispe in RCPTT
Next Topic:exec-process fails to complete when executing bash script
Goto Forum:
  


Current Time: Thu Mar 27 01:00:53 EDT 2025

Powered by FUDForum. Page generated in 0.03378 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top