If you are still looking for that one person who will change your life, take a look in the mirror.

Problem1:- How i can generate random test data in Robot framework?

Solution:- Use FakerLibrary

Install :- 
pip install robotframework-faker

Note:- Include FakerLibrary in settings as “Library FakerLibary”

Example:- To generate random number we can use code as below:-

generate random value in robotframework


Problem2:- How to generate random value within given range?

Solution:- Using Random keyword

Example:-
${randomValue} Evaluate random.randint(0, 5000) modules=random

Generate random value in robot framework


Problem3:- How to take screenshot on failures in Robot Framework?

Solution:- Using Screenshot library
1. Include the library in settings like Library Screenshot path_of_Directory 
2. Capture the screenshot on failure

Screenshot in robot framework


Problem4:- How to refresh browser in Robot Framework?
Solution:- 
1. Use “Reload” keyword
2. Use “Execute JavaScript” 

Refresh in browser using robot framework









More ways to Refresh?

Learn Robot Framework
Learn Java

Leave a Reply

Your email address will not be published. Required fields are marked *