Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Robot Framework Test Automation

You're reading from  Robot Framework Test Automation

Product type Book
Published in Oct 2013
Publisher Packt
ISBN-13 9781783283033
Pages 98 pages
Edition 1st Edition
Languages
Author (1):
Sumit Bisht Sumit Bisht
Profile icon Sumit Bisht
Toc

Internal re-use


As mentioned earlier, repetition within the single test constitutes test re-use internally. Note that the data, if any, involved in different instances of the iterations might come from outside, but the repetition only occurs within the test action.

Loops and flow control

Having gained a good background of the syntax of writing a test, it is time to move on to the most common and convenient way of iteration, that is, a loop. Robot Framework solves this problem through the use of Python styled for loops, but that's easily understandable for the uninitiated as well.

It follows a straightforward syntax, the loop is started with FOR which is a special keyword. This is followed with a variable that is present within the loop. This variable is followed by a mandatory IN statement. This is followed by the variable or a collection over which the for loop is to run. Like Python loops, the subsequent statements are indented by a single space. As soon as the indentation stops, it is assumed...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime