Javascript ProblemExecutor Selenium WebDriver

0

I can not execute the function doFilterOffer() on the page, it gives the following error

  

missing; before statement

What is the problem with this syntax below?

    if (driver instanceof JavascriptExecutor) {

        ((JavascriptExecutor) driver).executeScript("Function doFilterOffer();", "click");
    }
    
asked by anonymous 01.10.2015 / 21:26

1 answer

0

The error was in the use of the parameter Function

The correct one is:

  

((JavascriptExecutor) driver) .executeScript ("doFilterOffer ();",   "click");

    
01.10.2015 / 21:45