最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

After saving the form, the text in the iframe field is vanished - Selenium Java - Stack Overflow

programmeradmin3浏览0评论

I enter text into an iframe that is in a modal window. Everything is ok, the text is entered. But when I save the modal window, the text from the field disappears. I use this method to enter text

  new WebDriverWait(driver, 10).until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(element));
        WebElement body = driver.findElement(By.cssSelector("body"));
        driver.executeScript("arguments[0].innerHTML = arguments[1]", body, value);
        driver.switchTo().defaultContent();

I see that the text is entered into the field and I save the form that is in the modal window

 submitButton.click();

Does anyone know why this field is being cleared?

发布评论

评论列表(0)

  1. 暂无评论