Issue
I looked at multiple sources on the web. For example, https://www.guru99.com/handling-cookies-selenium-webdriver.html
Nothing works as they describe. After adding cookies with driver.manage().addCookie(ck)
, you still stay on the login page.
Could you, please provide, at least one working example on how to bypass the login screen to speed up the test execution suite in WebDriver Java?
Solution
I misunderstood the process. The sources I used all copy the same error. Thank you to @pburgr for the hint. The correct process is
- Login to the site with your username and password to record the cookies into the file.
- Open login page to get the domain cookies.
- Add cookies from the file to your request and go to the home page bypassing login process. In the code that is available on the web, they go to the login page in step 3 instead of the home page.
Answered By - Vladimir
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.