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?)
  • Attachment: Capture.PNG
    (Size: 3.48KB, Downloaded 143 times)
  • Attachment: Capture1.PNG
    (Size: 4.68KB, Downloaded 158 times)
  • Attachment: Capture2.PNG
    (Size: 9.69KB, Downloaded 128 times)
  • Attachment: try_gdbmenu.test
    (Size: 1.48KB, Downloaded 191 times)
  • Attachment: Capture3.PNG
    (Size: 101.84KB, Downloaded 165 times)
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: 124
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 Apr 25 11:27:12 GMT 2024

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

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

Back to the top