Мне нужно отправить значения в это всплывающее окно. это открыто в том же окне. когда я пытаюсь использовать обычный driver.findelement, появляется сообщение об ошибке, в котором говорится, что xpath не найден
Это мой код
Код: Выделить всё
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Homepage_login {
public static void main(String[] args) {
// TODO Auto-generated method stub
FirefoxDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
//driver.get("http://se.rdmsonline.net/login.aspx");
driver.get("http://se.rdmsonline.net/");
driver.findElement(By.xpath("//*[@id='rcmLang_Arrow']")).click();
driver.findElement(By.xpath("//*[@id='rcmLang_DropDown']/div/ul/li[2]")).click();
driver.findElement(By.xpath("//*[@id='txtUserName']")).sendKeys(" ");
driver.findElement(By.xpath("//*[@id='txtPassword']")).sendKeys(" ");
driver.findElement(By.xpath("//*[@id='btnLogin']")).click();
driver.findElement(By.xpath("//*[@id='Div1']/div/a")).click();
driver.findElement(By.xpath("//*[@id='txtUserName']")).sendKeys(" ");
driver.findElement(By.xpath("//*[@id='txtPassword']")).sendKeys(" ");
driver.findElement(By.xpath("//*[@id='btnLogin']")).click();
driver.findElement(By.xpath("//*[@id='rptSec_ctl00_imb']")).click();
driver.findElement(By.xpath("//*[@id='ctl00_Menu5']")).click();
driver.findElement(By.xpath("//*[@id='ctl00_cpl1_lnkNewNotification']")).click();
driver.findElement(By.xpath("//*[@id='ctl00_cplm_dtpDate_dateInput_text']")).sendKeys(" ");
}
}
Источник: https://stackoverflow.com/questions/229 ... ame-window