Dhara
Dhara

Reputation: 21

verify there is a green lock in the url indicating that it is a secure page using Selenium webdriver

How can I verify there is a green lock in the url indicating that it is a secure page, using Selenium webdriver?

Upvotes: 0

Views: 197

Answers (1)

Ant's
Ant's

Reputation: 13811

Why can't you try this:

String url = driver.getCurrentUrl();

Now you have url, which shows you whether its an http or https. If its https then your connection is secure.

Note: This wont work if you have local ssl certificate, accepted by you.

Upvotes: 1

Related Questions