0

maven3 と Serenity Runner を使用して Selenium スクリプトを実行中にエラーが発生しました: net.serenitybdd.core.pages.WebElementFacadeImpl$

エラーが発生しているステートメント: element(createButton).waitUntilVisible();

waitUntilVisible が「net.serenitybdd.core.pages.WebElementFacade.waitUntilVisible()」として定義されているエラーを引き起こしています。

エラーを解決するのを手伝ってください。

import net.serenitybdd.core.annotations.findby.By;
import net.serenitybdd.core.annotations.findby.FindBy;

public void createNewContent(final String option) {
  element(createButton).waitUntilVisible();
  createButton.click();
  boolean foundOption = false;
  for (final WebElement optionType : contentToCreateList) {
    if (optionType.getText().toLowerCase().contains(option.toLowerCase())) {
      foundOption = true;
      optionType.sendKeys("");
      optionType.click();
      break;
    }
  }
}
4

1 に答える 1

0

解決策を見つけました。共有したいだけです。問題は Firefox の寸法にありました。バッチ モードでの実行中に最大化ウィンドウ メソッドを使用している場合は、ブラウザ ウィンドウの寸法をリモート マシンの解像度に変更してください。わたしにはできる。Dimension d = new Dimension(1364,768); getDriver().manage().window().setSize(d);

于 2015-09-15T14:05:52.217 に答える