-2

I have to automate a Register and Sign In test case and I am using RIDE to write my tests. What I actually want to do is:

  • To make a Register, but every time when I run the test I have to change the email value.
  • I would prefer to make the Sign In test with the new created account after running the Register test.
  • It is possible that using RIDE to import faker library and to declare a ${Email} variable, so I can use the respective variable in both tests (Sign In and Register)? If it is, can you please tell me how I should do that or where I can found the necessary documentation.
  • If it cannot be done using faker library, is there another Robot library that will help me with this problem?

Thank you!

  • I've managed to Install Faker library, to import it in Ride and to generate random emails, right now I have a problems with the generated emails. I want to gave them a certain domain (default is set as hotmail.com), I want to set something as (mydomain.com) because I don't want to create some accounts on a certain websites for emails that are already in use. Can someone help? Thank You! – Cantor Paul Dan Feb 26 '16 at 13:18

1 Answers1

1

There is a faker library for robot, that you would use like any other library:

https://github.com/guykisel/robotframework-faker

Here is a simple example:

*** Settings ***
| Library | FakerLibrary

*** Test cases ***
Example
    ${email}=  FakerLibrary.Email
    log to console   \nemail: ${email}
Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685