I have an automation script that runs perfectly. But when i have copied the script to my colleagues the following line of code doesnt compile and gives the following error.
wait.until(ExpectedConditions.textToBePresentInElement(oq.findElement("_ctl0_ContentPlaceHolder1_industryQB_selectedIndustryLabel"), "F461300 Computer Wholesaling"));
Error below
Error:(231, 13) java: no suitable method found for until(org.openqa.selenium.support.ui.ExpectedCondition<org.openqa.selenium.WebElement>)
method org.openqa.selenium.support.ui.FluentWait.until(com.google.common.base.Predicate<org.openqa.selenium.WebDriver>) is not applicable
(argument mismatch; org.openqa.selenium.support.ui.ExpectedCondition<org.openqa.selenium.WebElement> cannot be converted to com.google.common.base.Predicate<org.openqa.selenium.WebDriver>)
method org.openqa.selenium.support.ui.FluentWait.<V>until(com.google.common.base.Function<? super org.openqa.selenium.WebDriver,V>) is not applicable
(cannot infer type-variable(s) V
(argument mismatch; org.openqa.selenium.support.ui.ExpectedCondition<org.openqa.selenium.WebElement> cannot be converted to com.google.common.base.Function<? super org.openqa.selenium.WebDriver,V>))
Here are the steps that i did. installed IDE (intellj Idea), added jdk to the project, added selenium jar to the project. Copied and pasted the Java files over.
I have even tried just copying the whole project over and every single method was resolved except for this one.
The script still works perfectly on my machine. But not on the new machine.
Feel Free to ask me any questions if it is not clear.
I am out of ideas now.
Aucun commentaire:
Enregistrer un commentaire