Well like other experts here said, there is NOT one approach or method that would be applicable to all.
It depends upon the project or the way your project manager wanted to use automation in the project.
Now regarding test runner application, why create ONE while there is already a standard GUI application called NUnit?
In my current project, I have implemented Page Object Model where i have differentiated every page of the application as an object or class.
Then I use properties as variables so i can call them whenever/wherever i want.
Then i call the class that i want to execute as per the needs of the test.
Hope that helps.
Sirus
On Mon, Sep 24, 2012 at 11:45 AM, Ben Houghton
<bdhou...@gmail.com> wrote:
Hello,
In an attempt to learn C#, I'm creating a test runner application that will execute selenium tests written in C# against drivers specified by the user. At the moment I'm creating the required IWebDriver instances, adding them to a list and then looping through said list and executing each test against it, thus giving me cross browser testing against each test. However this approach does lead to potential issues as since the same browser instance is being used when looping though the tests, there could be things left behind from the last test that might affect the current one in the loop (session data, cookies etc). As such I was thinking of refactoring to create a new instance of the required browsers for each test (essentially swapping the nested loops around). This though means that a new instance of the respective drivers' server will be created each time as well (along with new server log files etc), which seems like a bit of overkill when all I want to do is ensure a clean browsers session is started for each test.
What are the best practices around this area, and is there a way I can ensure that the browser is reset each time it is passed to a test, without Quitting and reinitialising a new instance of the server?
Hope the above question makes sense,
Cheers,
Ben
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/jerv8Hgx5RUJ.
For more options, visit https://groups.google.com/groups/opt_out.