我编写了一个用于切换到框架并将一些值发送到文本框的代码。在编写代码时它对我有用。现在它正在识别对象并且它没有传递值。请让我知道为什么它失败了。
Getobject 方法使用 xpath 查找元素,xpath 存储在属性文件中。
getobject("ForgotClaimNumber_Link").click();
driver.switchTo().frame(driver.findElement(By.id("fancybox-frame")));
WebDriverWait wait = new WebDriverWait(driver,100);
wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//*[@id='txtClaimNum']")));
getobject("ClaimNumber_Edit").sendKeys("5200098863");
getobject("Find_Button").click();