Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » Exit from a loop if condition meets.(Exit from a loop if condition meets.)
Exit from a loop if condition meets. [message #1791997] Mon, 09 July 2018 13:19 Go to next message
noor shiblee is currently offline noor shibleeFriend
Messages: 5
Registered: November 2017
Junior Member
Hello,

I am trying to solve one of my rcptt execution problem. I want to wait until an element is loaded in my windows actually.

As i don't found any predefined api for doing this, i am trying to do this by using a loop. But i can not break from a loop if my condition meets. what i am doing is:

proc "wait-until-icon-loaded" [val iconName] {
loop [val count 1] [val n 5] {
if [$count | lt $n] {

try{

let [val text [get-button "Configure" | get-property "getToolTipText()" -raw]] {
if [$text | contains $iconName] {

recur [$count | plus 100] [$n]
}
}
} -catch {
show-alert "inside catch"
}

recur [$count | plus 1] [$n]
} -else {
show-alert "Finish"
}
}
}


But it can not break from loop if the execution meets its condition. What is the way in rcptt to break from a loop if condition meets or how i can wait until an element is loaded.

I want to do this because rcptt default wait time is not working in jenkins actually. It loads another window before finishing task in the previous one.


Thanks
Re: Exit from a loop if condition meets. [message #1792790 is a reply to message #1791997] Tue, 24 July 2018 07:03 Go to previous message
Markus Manck is currently offline Markus ManckFriend
Messages: 34
Registered: June 2015
Member
Hi,

you should be able break the loop by not calling recur in case of match.
In your example you seem to recur in any way.

It might be you omitted it for the sake of the example, but if you want to wait in case of a nonmatch you can use the "wait" statement.

Best regards
Markus
Previous Topic:Unable to add an application in RCPTT
Next Topic:Bug with renaming Builder annotation
Goto Forum:
  


Current Time: Thu Dec 26 14:28:22 GMT 2024

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

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

Back to the top