FB login Button doubt | Selenium Forum
M
Posted on 10/10/2017
Was trying to login in FB and notice that there are 2 different elements for the same login Button.

FB login button -
1 - <input value="Log In" tabindex="4" data-testid="royal_login_button" type="submit" id="u_0_3">
[b:qfizulr4]>>> XPath - driver.findElement(By.xpath("//input[@value='Log In' and @id='u_0_3'")).click(); // unable to login using this xpath[/b:qfizulr4]

2 - <label class="uiButton uiButtonConfirm" id="loginbutton" for="u_0_2"><input value="Log In" tabindex="4" data-testid="royal_login_button" type="submit"
id="u_0_2"></label>
[b:qfizulr4] >>>XPath - driver.findElement(By.id("loginbutton")).click(); // successfully login in to FB[/b:qfizulr4].


Question is : does the login button consists 2 different attributes 'login text' and 'login button'?
how come the inspect link pointing towards 2 different attributes on login button. please help!.

M
Replied on 10/10/2017

this id='u_0_3 is unstable.