Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » How to scroll a view ?(What are the ECL command that could allow me to scroll down a view ?)
How to scroll a view ? [message #1791174] Mon, 25 June 2018 13:10 Go to next message
Vincent Richaud is currently offline Vincent RichaudFriend
Messages: 7
Registered: February 2018
Junior Member
In one of my tests, written in ECL with RCPTT, I need to check the value of a register. To do so I check the value shown in the registers view

The problem is that the register I'm looking for is far in the list. And the debugger load the value dynamically, when scrolling the list.
57-data-list-register-values --thread 1 --frame 0 x 15
57^done,register-values=[{number="15",value="0x0"}]
(gdb) 
58-data-list-register-values --thread 1 --frame 0 N 15
58^done,register-values=[{number="15",value="0"}]

So in order to check the value of my register, I need to force a scrolling to force the debugger to load the value. So here's my question : how can I make the test scroll the view ?

-----------------------------------------------------------

If I don't do this, the execution fail when I try to select the register using this:
get-view Registers | get-tree | get-item "General Registers/MY_REGISTER"

It throws me:
Failed to set selection: [[General Registers, MY_REGISTER]].

I've tried to use the below code to force the discovery but it didn't worked.
with [ get-view Registers | get-tree ] {
	get-item "General Registers" | expand-all
	select "General Registers/MY_REGISTER" |
Re: How to scroll a view ? [message #1791353 is a reply to message #1791174] Thu, 28 June 2018 10:16 Go to previous messageGo to next message
Viktoria Dlugopolskaya is currently offline Viktoria DlugopolskayaFriend
Messages: 124
Registered: March 2017
Senior Member
Hi Vincent,

There is no command to scroll a view down, but you can try to achieve the same result by using 'try' command with 'times' parameter:
try -times 5 -command { get-view Registers | get-tree | select "General Registers/MY_REGISTER" } -catch { }
get-view Registers | get-tree | get-item "General Registers/MY_REGISTER"
Re: How to scroll a view ? [message #1791541 is a reply to message #1791353] Mon, 02 July 2018 08:42 Go to previous message
Vincent Richaud is currently offline Vincent RichaudFriend
Messages: 7
Registered: February 2018
Junior Member
Hi Viktoria,

Thanks for your answer.
I'm a bit frustrated that there's no such commmand :-(

Edit: I've tried your method, but it doesn't work ... , my bad, I've made mistakes in my test, now it works !!

The use of the command "select" force the system to go through the whole tree to find the item to select. So it force the discovery of all the registers.
I use a first "select" inside a try-catch block because it will failed (don't know why). Then a second one (that will work since registers has been discovered now) to perform what I want to perform.
try -command { select "General Registers/MY_REGISTER" } -catch { }
select "General Registers/MY_REGISTER" | get-menu "Number Format/Hex" | click

[Updated on: Mon, 02 July 2018 12:44]

Report message to a moderator

Previous Topic:Code coverage with RCPTT test scripts
Next Topic:Symbol 'std' could not be resolved
Goto Forum:
  


Current Time: Wed Sep 19 20:32:37 GMT 2018

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

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

Back to the top