How to wait until an element is present in Selenium?

后端 未结 5 1600
情话喂你
情话喂你 2020-11-27 02:53

I\'m trying to make Selenium wait for an element that is dynamically added to the DOM after page load. Tried this:

fluentWait.until(ExpectedConditions.presen         


        
5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-27 03:50

    FluentWait throws a NoSuchElementException is case of the confusion

    org.openqa.selenium.NoSuchElementException;     
    

    with

    java.util.NoSuchElementException
    

    in

    .ignoring(NoSuchElementException.class)
    

提交回复
热议问题