2

I get a compilation error when compiling with ANT but not when I compile with Eclipse. Is there any reason for this? The compliation error I get when using Ant is error:

incompatible types: By cannot be converted to String            wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.className("ReportFrame")));

The method frameToBeAvailableAndSwitchToIt is an overloaded method with the signature and parameter:

frameToBeAvailableAndSwitchToIt(By locator)
frameToBeAvailableAndSwitchToIt(java.lang.String frameLocator)
LinhSaysHi
  • 642
  • 5
  • 14
  • 30
  • 1
    Eclipse doesn't use oracle/openjdk javac but the Eclipse Compiler for Java, some discussion [here](http://stackoverflow.com/q/3061654/658663). Try clearing the artifacts built by eclipse and re-compiling in eclipse; that may then produce the same error. Also potentially your ant build order may be off; it could be that the caller of `frameToBeAvailableAndSwitchToIt` is being compiled against an older version of `ExpectedConditions` - probably worth checking – beresfordt Aug 10 '15 at 19:15
  • I'm not really sure what it means to "clearing the artificats built by eclipse" and not sure how the ant build order can be off. I've tried the 'clean' feature in eclipse and didn't work. I've downloaded ANT and set the ANT_HOME and path and I have the latest jdk installed – LinhSaysHi Aug 11 '15 at 00:01

0 Answers0