Skip to main content



      Home
Home » Eclipse Projects » RCP Testing Tool » get-menu, text includes filepath
get-menu, text includes filepath [message #1779698] Thu, 11 January 2018 06:25 Go to next message
Eclipse UserFriend
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 168 times)
  • Attachment: Capture1.PNG
    (Size: 4.68KB, Downloaded 184 times)
  • Attachment: Capture2.PNG
    (Size: 9.69KB, Downloaded 156 times)
  • Attachment: try_gdbmenu.test
    (Size: 1.48KB, Downloaded 212 times)
  • Attachment: Capture3.PNG
    (Size: 101.84KB, Downloaded 197 times)
Re: get-menu, text includes filepath [message #1780380 is a reply to message #1779698] Sun, 21 January 2018 23:21 Go to previous message
Eclipse UserFriend
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: Fri Jul 25 09:14:22 EDT 2025

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

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

Back to the top