Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/382.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
hdfc网络银行页面[Selenium Webdriver][JAVA]中客户id的xpath_Java_Selenium_Xpath_Selenium Webdriver - Fatal编程技术网

hdfc网络银行页面[Selenium Webdriver][JAVA]中客户id的xpath

hdfc网络银行页面[Selenium Webdriver][JAVA]中客户id的xpath,java,selenium,xpath,selenium-webdriver,Java,Selenium,Xpath,Selenium Webdriver,我正在尝试为以下网站查找客户id的xpath- 我尝试了各种XPath,例如- 1//输入[@class='input\u password'] 2.html/body/form/table[2]/tbody/tr/td[2]/table/tbody/tr[1]/td[1]/table/tbody/tr[3]/td[2]/table/tbody/tr[2]/td[2]/span/input 但它们似乎都没有起作用。我正在使用SeleniumWebDriver发送密钥 对于例如“123456”,

我正在尝试为以下网站查找客户id的xpath-

我尝试了各种XPath,例如-

1//输入[@class='input\u password'] 2.html/body/form/table[2]/tbody/tr/td[2]/table/tbody/tr[1]/td[1]/table/tbody/tr[3]/td[2]/table/tbody/tr[2]/td[2]/span/input

但它们似乎都没有起作用。我正在使用SeleniumWebDriver发送密钥 对于例如“123456”,请转到该客户id框并单击“继续”按钮。
但是硒并不是每次都能找到这种元素。谁能帮我一下吗

文本框在框架内,您需要先切换到它

// switch to the frame
driver.switchTo().frame("login_page");

// find the text box and write to it 
driver.findElement(By.className("input_password")).sendKeys("123456");

// switch back to main window
driver.switchTo().defaultContent();

文本框在框架内,您需要先切换到它

// switch to the frame
driver.switchTo().frame("login_page");

// find the text box and write to it 
driver.findElement(By.className("input_password")).sendKeys("123456");

// switch back to main window
driver.switchTo().defaultContent();

如果有任何帮助或建议,我们将不胜感激!!如果有任何帮助或建议,我们将不胜感激!!