在 URL 上"https://cheapticket.in/b2c/flights",单击“注册”按钮后会出现一个弹出框,我想在其中输入电子邮件和所有其他字段,但会引发以下异常:
Exception in thread "main" org.openqa.selenium.ElementNotInteractableException:
Element <input id="" class="fluid" name="login" type="text"> could not be
scrolled into view
package TestPackage;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.GeckoDriverService;
public class CheapTickets {
public static void main(String[] args){
System.setProperty("driver.chrome.driver", "D:\\Selenium\\chromedriver.exe");
WebDriver driver=new ChromeDriver();
driver.get("https://cheapticket.in/b2c/flights");
System.out.println("Loaded cheaptickets");
//go to sign up
driver.findElement(By.xpath("//a[@id='signup']")).click();
System.out.println("Travelled to signup");
driver.findElement(By.xpath("//input[@class='fluid']")).sendKeys("abc@abc.com");
}
}
我该如何解决这个问题?
手掌心
qq_遁去的一_1
相关分类