DEV Community


Discussion on: Selenium Testing - How to sign in to Two-factor authentication?

rsanzedah profile image

Hello, i used for my automation code. Was working fine for signing in but as soon as i changed to updated chrome driver to 76, the opt part stopped working. The authentication is wrong now. Any feedback. Is there any relationship with chromedriver version for totp

public static String getotp(String secretkey) {
// String secretkey = "6BSLNLLRH7HLJFMM"; // <- this 2FA secret key.

    Totp totp = new Totp(secretkey);
j_sakamoto profile image
jsakamoto Author

My understanding is that there is no relationship between computational TOTP and Selenium WebDriver.

I guess your problem is caused by becoming incompatibility of your test code that against with test target web site.