好的,你可以在下面看到我的代码 代码打开一个chrome窗口然后我手动浏览到matematikfessor.dk 登录并打开一个东西然后我想填写matematikfessor.dk的任何子URL上的文本框,如https://www.matematikfessor.dk/exalpme/testing/#
JOptionPane.showMessageDialog(null, "Hello");
System.setProperty("webdriver.chrome.driver", "C:\\Users\\danie\\Downloads\\chromedriver_win32/chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
String url = driver.getCurrentUrl();
driver.get(url);
WebElement answer = driver.findElement(By.xpath("//input[@class='answerInput']"));
WebElement answertest = driver.findElement(By.xpath("//input[@class='answerWrapper']"));
answer.sendKeys("12");
answertest.sendKeys("123");