Forum Discussion
In a keyword test or script, if you use the Run Browser operation or the Browsers.Item().Run method, when you reference Aliases.browser then in your tests, it will use whatever was just run.
However, as shankar_r, unless there is a legitimate business reason to have multiple browsers open while you're running the tests, I'd recommend shutting them all down before you kick off your tests. It just generally saves confusion.
Well, the reason is the development phase of the test - I dont want to close all my open working tabs / documentations / whatever I have open during the process where I create and test the test I am writing ...
I would have to close my running application multiple times and go back to the state where I am, creating the testcase. Now I am used to have the tab open, create the namemappings and then test it step by step with a new Browser not touching my open Browsers (test requirements / documentations / manuals whatever)
- tristaanogre9 years agoEsteemed Contributor
This is why the environment I use for developing automation (a dedicated VM) is different than my actual desktop where I do all my other work. That way I don't "pollute" my clean room with clutter of documentation, open browser instances, etc. I'd highly recommend doing something like this.
In the meantime, most modern browsers (IE, FireFox, Chrome) have the ability that, when you close a session, you can have it "save" all your open tabs so that, when you re-run the browser, it will pick up where you left off. So, when you start your "playback" to check what you've done, close and save your browser tabs first, then run your test.
Think of it as the same thing you would do in a manufacturing environment... you don't test a substance, device, machine, etc., in an environment with a lot of variation... you strictly control the environment so that tests are repeatable and assured to be unaffected by outside influences. Perhaps not always in a "clean room" but any QA lab at a manufacturing firm would have controlled environments for their tests. In our case, you're testing a web page in a particular browser. Anything else running on that machine, including other browsers, could potentially pollute your "sample" making your test unreliable.