Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » get-menu, text includes filepath
get-menu, text includes filepath [message #1779698] Thu, 11 January 2018 11:25 Go to next message
Andrew Small is currently offline Andrew SmallFriend
Messages: 3
Registered: December 2017
Junior Member
From the recorder, the menu -path option is

get-view Console | get-button "Display Selected Console" | click -arrow
get-menu
-path "5 testShader_shader_simulator [Renesas Shader Simulator Debugging] C:\\/testeagl\\/Renesas\\/DebugComp\\/imp_x5-elf-gdb.exe -shader-core=2 (7.10.1)"
| click

As this contains my test folder, to be portable the script needs to build this dynamically. I've been able to read the path OK, from another property, but not use it subsequently in the get-menu call. Possibly it is lacking the \\ tags.

I've attached the script and some show-alert screenshots.
Capture: $binpath
Capture1: $gdbmenu
Capture2: Error message from get-menu $gdbmenu
Capture3: AUT showing menu

One useful feature would be to access menu items by their raw index (my understanding of the current -index option is that it is only valid in the case where menu entries are repeated, requiring a -path and -index). For example here, get-menu -rawindex 4 would obtain the fifth item. Alternatively a -contains option allowing partial string match (AFAIK the -path has to be an exact, full, match?)
Re: get-menu, text includes filepath [message #1780380 is a reply to message #1779698] Mon, 22 January 2018 04:21 Go to previous message
Viktoria Dlugopolskaya is currently offline Viktoria DlugopolskayaFriend
Messages: 109
Registered: March 2017
Senior Member
Hi Andrew,

1) try to add 'invoke replaceAll "/" "\\\\/"' command after 'concat' command, like this:
let [val gdbmenu [concat "5 testShader_shader_simulator [Renesas Shader Simulator Debugging] " $binpath | invoke replaceAll "/" "\\\\/"]]{

2) to get menu item by a partial string, use 'get-menu -path ".*menu-item-name.*"'
to get item by index use 'get-menu -path ".*" -index 2' (is possible in RCPTT 2.3.0 nightly)
Previous Topic:Super Context and expectation of failure
Next Topic: Get item text based on the index no. from a table
Goto Forum:
  


Current Time: Thu Jun 21 20:34:34 GMT 2018

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

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

Back to the top