lundi 5 janvier 2015

How to data parametrization in robot framework

I am basically trying to learn data parametrization in robot framework (mostly with web based testing as the context). I have 4 points which i am looking to get covered . All the four point are related to each other a lot.




  1. First one - A code problem


    I was looking to iterate a values of a list variable using for loop and was unable to access the nth value .




I am able to use Input Text //textarea[@id="MainContent_txtAddress"] @{Address}[1] with no errors


But when i am using a for loop to access the values i am getting this error ,


Starting test: RobotFrameworkcode.Nsure.ForLoop 20150105 18:26:05.484 : FAIL : Resolving variable '${jobcode[i]}' failed: NameError: name 'i' is not defined Ending test: RobotFrameworkcode.Nsure.ForLoop


The for loop snippet which is causing the error .





ForLoopTest
: FOR ${i} IN Range |0| |1|
\ Log to Console @{jobcode[i]}



Is there a better way to access the value of a list variable at n th element . Are list variables similar to arrays ?



  1. I want to pass values to textboxes in a data entry form in parametrized format through excel sheet or csv or through a collection of list variables representing a page, Is that possible in robot framework ? Need help with examples and sample code on the same . I could not find much content on the internet regarding the same.

  2. Any other ideas on how others did data parametrization in general in robot framework. What robot framework tools or concepts where used for the same ?

  3. Thirdly,I would like to know if there are any good tutorials or websites or videos to help learn robot framework in general . The official documentation is good , but i am looking for more content example wise,so as to enable the beginners to be able to relate faster with the concepts.


Aucun commentaire:

Enregistrer un commentaire