Selenium C# WebDriver: Wait until element is present

前端 未结 24 3062
礼貌的吻别
礼貌的吻别 2020-11-22 08:53

I want to make sure that an element is present before the webdriver starts doing stuff.

I\'m trying to get something like this to work:

WebDriverWait w         


        
24条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-22 09:45

    First answer is good, my problem was that unhandled exceptions didn't close web driver properly and it kept the same first value I had used which was 1 second.

    If you get the same problem

    restart you visual studio and ensure that all the exceptions are handled properly.

提交回复
热议问题