Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 13:06 Go to next message
Ravi Mallajosyula is currently offline Ravi MallajosyulaFriend
Messages: 4
Registered: August 2017
Junior Member
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 05:51 Go to previous messageGo to next message
Viktoria Dlugopolskaya is currently offline Viktoria DlugopolskayaFriend
Messages: 124
Registered: March 2017
Senior Member
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 15:56 Go to previous messageGo to next message
Ravi Mallajosyula is currently offline Ravi MallajosyulaFriend
Messages: 4
Registered: August 2017
Junior Member
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 15:59 Go to previous messageGo to next message
Ravi Mallajosyula is currently offline Ravi MallajosyulaFriend
Messages: 4
Registered: August 2017
Junior Member
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 04:24 Go to previous messageGo to next message
Viktoria Dlugopolskaya is currently offline Viktoria DlugopolskayaFriend
Messages: 124
Registered: March 2017
Senior Member
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 13:42 Go to previous message
Ravi Mallajosyula is currently offline Ravi MallajosyulaFriend
Messages: 4
Registered: August 2017
Junior Member
Thanks a lot Viktoria. That works..
Previous Topic:Nightly runner (2.2.0) fails with target platform initialization
Next Topic:Error log verification issue
Goto Forum:
  


Current Time: Tue Oct 23 13:57:05 GMT 2018

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

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

Back to the top