From the course: Robot Framework Test Automation: Level 2
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Centralize the browser and URL variables - Selenium Tutorial
From the course: Robot Framework Test Automation: Level 2
Centralize the browser and URL variables
- You may recall that to optimize things, I was going to incorporate this idea of a data directory with an input data file. And I was going to place my input data and my URLS in a centralized location. Right now we have Front_Office, End_to_End and Back_Office and each one of them has a copy of this browser variable and both Front_Office and Back_Office have those respective URLs and End_to_End also has the same two URLs. You can see that starts to smell a little bit because we've got redundancy all over the place. So, a solution for that is pretty simple. I can go to my suite here and create a new directory called Data and inside there I'll create a new file called InputData.robot and now what I'm going to do is go to the End_to_End script here and grab this whole variable section and simply cut it out. I'll go to InputData, paste that in, so now you can see that I have an instance of the BROWSER variable and I'll just change that to edge for the time being and I've got my…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.