Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » how to use item without give full path
how to use item without give full path [message #1697235] Tue, 02 June 2015 15:40 Go to next message
jeremie gr is currently offline jeremie grFriend
Messages: 41
Registered: June 2015
Member
hi ,

i would like to use element on my script without give full path

example :
with [get-view Data | get-tree] {
    select "Global Variables Library/New Variable" | key-type F2
    with [get-editbox] {
        set-text "hello world"
        key-type Enter
    }


this script select element named "new variable" that it's changing by "hello world"

But , I need to give full path like "Global Variables Library/New Variable";

somebody know if it's possible to just give name of element "New Variable" and script find it alone.

thanks advance,

jeremie
Re: how to use item without give full path [message #1697241 is a reply to message #1697235] Tue, 02 June 2015 15:59 Go to previous messageGo to next message
Ulyana Skorokhodova is currently offline Ulyana SkorokhodovaFriend
Messages: 280
Registered: July 2014
Senior Member
Hi Jeremie,

You could try to use a regular expression, e.g.:

select ".*/New Variable" | key-type F2

Kind regards,
Ulyana.
Re: how to use item without give full path [message #1697245 is a reply to message #1697241] Tue, 02 June 2015 16:20 Go to previous messageGo to next message
jeremie gr is currently offline jeremie grFriend
Messages: 41
Registered: June 2015
Member
ok thanks, it's work

but if I have more then 2 level like " library/Global Variables Library/New Variable" or more. What it's regular expression ?

jeremie
Re: how to use item without give full path [message #1697340 is a reply to message #1697245] Wed, 03 June 2015 09:55 Go to previous messageGo to next message
Ulyana Skorokhodova is currently offline Ulyana SkorokhodovaFriend
Messages: 280
Registered: July 2014
Senior Member
Hi Jeremie,

Do you mean you don't know exactly what level will be New Variable at?

You could create a procedure which takes a tree item and searches all children and check if there is a New Variable among them.

Kind regards,
Ulyana.
Re: how to use item without give full path [message #1697376 is a reply to message #1697340] Wed, 03 June 2015 13:50 Go to previous message
jeremie gr is currently offline jeremie grFriend
Messages: 41
Registered: June 2015
Member
hi Ulyana,

you right, I don't know what level will be New Variable.

I has thunk about procedure but how can I read, use tree and keep a path of my "new variable" then I want use ?
sorry I'm novice.

thanks,
jeremie
Previous Topic:RightClick Problems
Next Topic:how to use testcase with different context
Goto Forum:
  


Current Time: Thu Mar 28 15:12:37 GMT 2024

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

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

Back to the top