RE: How to open the application without providing login crdentials using TestNG?


Here is my scenario:
In TestNg suite we are providing some test cases in that while executing  testcases,for first test case  browser is opening and when it calls second test case again the browser is opening and asking login credentials .Is there any way pls provide solution.

surekha Train Asked on September 25, 2014 in Selenium WebDriver.
Add Comment
3 Answers

thank you.Im explain what my intention .Here is my scenario:
i wrote two test cases like in that it having two icon links like add company and manage companies
>I wrote one test case for add company .
>second test case for managecompanies
>Then i created one test suite
>When i execute the test suite first testcase having login crdentials which should be given in first test case
>While it calls second test case a new browser opens and again it asking login crdentials to click manage companies.pls provide any solutiotion to call the managecomapnies without login functionality

Train Answered on September 26, 2014.

If you are using suite then use @BeforeSuite and @AfterSuite these will work fine.

Note: I used beforeTest because I was not knowing your code and beforeTest also works fine (To work on one browser only – As per my ex above) I guess.

Below link is very useful to learn TestNG.

on September 27, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.