Note: I will be adding screenshots to aid the massive block of text, so check back periodically :)
Start:
Firstly, lets make a small project. Our aims:
Step 1 - Opening RIDE
Now that you have successfully installed RIDE, it can be opened by typing robot.py in cmd
You should be presented with RIDE's UI - You can build your tests from here if you want, but I find it far easier to set yourself up first manually in your windows directory.
Step 2 - Creating your directory and test files
Navigate to your C:\ drive and create a folder e.g C:\RobotTests
Within this directory, create 3 files:
MainSuite.txt
_TestKeywords.txt
_TestRepository.txt
The idea of this structure is that your main suite contains your scenarios, the keywords contain the actions needed to compelte your scenario, and the repository will contain your variables mainly locators (where things are on the page)
Step 3 - Opening your project in RIDE
Within RIDE, click the "open directory" button and click the folder you created. RIDE will then show you the 3 files within your directory on the left hand side.
Step 4 - Linking your test files together
Now that you have set up your base files, you will need to make them refer to each other. To do this you can manually type out the code or use RIDE to add a library.
The code within MainSuite.txt looks like this:
*** Settings ***
Library Selenium2Library
Resource ...\_TestKeywords.txt
Resource ...\_TestRepository.txt
Summary
You should now have a project you can open and begin writing your tests.
Next up...
In my next post I will be introducing writing 1 test case that will
Open Chrome
Go to Google.com
Type a search
Click the search button
Verify the search
It will cover
Creating a test case
Writing your own keywords
Understanding locators
Running your test
Introduction to understanding test structure
Feel free to tackle it yourself and read up later :) Good luck!
Start:
Firstly, lets make a small project. Our aims:
- Create a directory containing our test(s)
- Create a file indicating our test cases
- Create a file containing our Keywords
- Create a repository for our locators
- Linking all the above together
Step 1 - Opening RIDE
Now that you have successfully installed RIDE, it can be opened by typing robot.py in cmd
You should be presented with RIDE's UI - You can build your tests from here if you want, but I find it far easier to set yourself up first manually in your windows directory.
Step 2 - Creating your directory and test files
Navigate to your C:\ drive and create a folder e.g C:\RobotTests
Within this directory, create 3 files:
MainSuite.txt
_TestKeywords.txt
_TestRepository.txt
The idea of this structure is that your main suite contains your scenarios, the keywords contain the actions needed to compelte your scenario, and the repository will contain your variables mainly locators (where things are on the page)
Step 3 - Opening your project in RIDE
Within RIDE, click the "open directory" button and click the folder you created. RIDE will then show you the 3 files within your directory on the left hand side.
Step 4 - Linking your test files together
Now that you have set up your base files, you will need to make them refer to each other. To do this you can manually type out the code or use RIDE to add a library.
The code within MainSuite.txt looks like this:
*** Settings ***
Library Selenium2Library
Resource ...\_TestKeywords.txt
Resource ...\_TestRepository.txt
Summary
You should now have a project you can open and begin writing your tests.
Next up...
In my next post I will be introducing writing 1 test case that will
Open Chrome
Go to Google.com
Type a search
Click the search button
Verify the search
It will cover
Creating a test case
Writing your own keywords
Understanding locators
Running your test
Introduction to understanding test structure
Feel free to tackle it yourself and read up later :) Good luck!