Skip to content
Advertisement

Selenium Web Driver Java – User and passwords Always used

I have many codes that I wrote the user and the password but I wanted one way of to declare and call in all codes.

Is this exist?

JavaScript

Advertisement

Answer

If I understand correctly you need to loop a set of credentials.

An example where usernames and passwords are stored as Map<String, String> object.

You can loop all entries in one driver instance or create new driver instance for every entry.

JavaScript

The credentialsMap can be ofc used as argument.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement