简体   繁体   English

Naukris登录按钮,无法单击

[英]Naukris login button, not able to click

I was trying to automate resume upload procedure for naukri.com, but unable to click on naukris home button. 我试图为naukri.com自动执行简历上传过程,但无法单击naukris主页按钮。 Its not iframe as well. 它也不是iframe。

website : https://login.naukri.com/nLogin/Login.php 网址: https : //login.naukri.com/nLogin/Login.php

Code used : 使用的代码:

driver.findElement(By.xpath(".//[@id='emailTxt']")).sendKeys(userName);
Thread.sleep(2000);
driver.findElement(By.xpath(".//*[@id='pwd1']")).sendKeys(password);
Thread.sleep(2000);
driver.findElement(By.xpath(".//*[@id='sbtLog']")).click();

There are two element with id='sbtLog' , the driver finds the first one and click on it, but you need the second one. 有两个id='sbtLog'元素,驱动程序找到第一个元素并单击它,但是您需要第二个元素。 Look for an element with this id that also has attribute name='Login' 查找具有此id的元素,该元素也具有属性name='Login'

driver.findElement(By.xpath(".//*[@id='sbtLog' and @name='Login']")).click();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM