[Test suite with Java & Selenium : Problem with driver]

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Test suite with Java & Selenium : Problem with driver]

DerFaya
Hi !

I've a problem I can't solve :
I'm currently on an internship and I'm asked to perform tests on a website, such as Add a new user, add a new recipe ...

My tests work fine, and I even made a Test suite which works fine too. My problem is the following :

Every time I start a new test, It opens a new window and I have to log again on the website (you can't perform test without being logged). What I want is that once I log in (It's my first test, which try to connect me) I stay connected to perform other tests and in the end, I log out.

So for the moment I have this (Yes I'm French :p) :

@RunWith(Suite.class)
@Suite.SuiteClasses({
    TestCo.class,
    TestAjoutClientContratOK.class,
    TestAjoutClientContratOutDated.class,
    TestAjoutRecette.class
})
public class MainTest {
    }

But all the tests have in @before a connection.
Is it possible to log once, do my Test suite, then log off ?

Thanks !