0

I have just migrated from 2.43 to 3.13 My selenium.

My piece of code:

My constructor has the following.. Now I am getting error on the until function.. How to resolve this.. I have copied guava-15.0 from old file but still not working.. Is there any way that i can add fluent wait without much pain? or can I make it work this until function?

public MyAlerts() throws IOException {
        try {
            WebDriverWait wait = new WebDriverWait(driver, 90);
            wait.until(ExpectedConditions.visibilityOfElementLocated(welcomeHeader));
            wait.until(ExpectedConditions.visibilityOfElementLocated(welcomeMessage));
            wait.until(ExpectedConditions.visibilityOfElementLocated(addNewAlert));
            wait.until(ExpectedConditions.visibilityOfElementLocated(viewCardDropdown);         
            WelcomeHeader = driver.findElement(welcomeHeader);
            WelcomeMessage = driver.findElement(welcomeMessage);
            AddNewAlert = driver.findElement(addNewAlert);
            ViewCardDropDown = driver.findElement(viewCardDropdown);
            AlertSettingsBanner = driver.findElement(alertsettingsBanner);
            AlertSettings = driver.findElement(alertsettings);
            AlertHistory = driver.findElement(alertHistory);
            LookingForSomething =driver.findElement(lookingforSomethingBlock);
            HelpIcon=driver.findElement(helpIcon);  
            test.pass("Navigated to My Alerts Page",
                    MediaEntityBuilder.createScreenCaptureFromPath(captureScreen()).build());

        } catch (Exception e) {
            test.fail("My Alerts Page Error *********" + ExceptionUtils.getStackTrace(e), MediaEntityBuilder.createScreenCaptureFromPath(captureScreen()).build());
        }
    }
ChanGan
  • 4,254
  • 11
  • 74
  • 135
  • 2
    Possible duplicate of [wait.until(ExpectedConditions) doesnt work any more in selenium](https://stackoverflow.com/questions/42421148/wait-untilexpectedconditions-doesnt-work-any-more-in-selenium) – Ashok kumar Ganesan Jul 18 '18 at 09:41
  • Seems like a duplicate as @Ashokkumar pointed out. I would wait for some more dup votes to close this issue as a duplicate. – undetected Selenium Jul 18 '18 at 10:55

0 Answers0