Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion FOR loop in robot framework, how to exit if conditions are met
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Trey Duskin  
View profile  
 More options Nov 2 2012, 12:18 pm
From: Trey Duskin <t...@maldivica.com>
Date: Fri, 2 Nov 2012 09:18:45 -0700 (PDT)
Local: Fri, Nov 2 2012 12:18 pm
Subject: Re: FOR loop in robot framework, how to exit if conditions are met

You might also want to consider the Wait Until Keyword Succeeds (see
Builtin Library) to handle this.  That would give you time-based control
over how long to wait and how often to re-check, which could be more
feasible for what you are testing.

Also, the 'and' and 'or' support comes from the Evaluate keyword, which
simply uses the Python/Jython eval() function.  So, the support for those
conjunctions comes from Python, not RF.

On Friday, November 2, 2012 9:24:19 AM UTC-4, Drewcasket wrote:

> Thanks for the help!! I was unaware that you could use the "and" "or"
> conjunctions within robot framework.  I suppose reading the included
> userguide would put a stop to my postings lol. Once again thanks for the
> help!!

> Drew
> On Thursday, November 1, 2012 3:57:27 PM UTC-4, Drewcasket wrote:

>> I wrote a for loop within robot framework, I need it to execute until
>> certain conditions are met.  I can't find a built in key word that does
>> this efficiently.  Any help would be appreciated.

>> :FOR | ${index} | IN RANGE | 100
>>       VR button pressed
>>       sleep | 1 sec  
>>       ${micState}= | Devaluate |
>> signals[UISpeechService][micState][value][mode]
>>       ${VoiceRecognition}= | Devaluate |
>> signals[UISpeechService][voiceRecognition][value][state]
>>       ${DialogActive}= | Devaluate |
>> signals[UISpeechService][vrDialogActive][value][state]
>>       sleep | 1 sec  
>>       should be equal | ${micState}  | "open"
>>       should be equal | ${VoiceRecognition} | "on"
>>       should be equal | ${DialogActive} | true

>> so basically this presses the VR button, evaluates signals from another
>> program, then compares those values to what they should be.

>> This will continue until the values compared are all equal.  

>> The problem that is occuring is that if at any point the values are not
>> equal it fails the test and ends the testcase. Or if they are all true
>> after the first iteration, it will continue to do the loop 100 times.

>> How do I get it to exit the loop as soon as the three conditions are
>> equal? While also continuing the loop if they are not equal.

>> Thank you


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.