0

While executing selenium scripts using maven3 and Serenity Runner getting error: net.serenitybdd.core.pages.WebElementFacadeImpl$

Statement where I am getting error: element(createButton).waitUntilVisible();

The waitUntilVisible is causing the error which is defined as "net.serenitybdd.core.pages.WebElementFacade.waitUntilVisible()"

Please help me to resolve the error.

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;
    }
  }
}
Erick G. Hagstrom
  • 4,873
  • 1
  • 24
  • 38

1 Answers1

0

I found the solution, Just want to share. The issue was with firefox dimensions, in case you're using the maximize window method while executing in batch mode, change the brwoser window dimensions to remote machine resolution. It works for me.Dimension d = new Dimension(1364,768); getDriver().manage().window().setSize(d);