【问题标题】:Selenium - How to Wait For an Element's Text to no longer be empty?Selenium - 如何等待元素的文本不再为空?
【发布时间】:2021-05-21 13:52:45
【问题描述】:

在条件等待中苦苦挣扎。开箱即用的方法是等待文本出现。 唉,文本不再存在。

new WebDriverWait(Driver.Browser, Timeouts.Process(timeout)).Until(SeleniumExtras.WaitHelpers.ExpectedConditions.TextToBePresentInElementLocated(this.Selector.Locator, text));

【问题讨论】:

    标签: c# string selenium-webdriver webdriverwait is-empty


    【解决方案1】:

    我想出了

    new WebDriverWait(Driver.Browser, Timeouts.Process(timeout)).Until(d => d.FindElement(this.Selector.Locator).Text != text);
    

    然后我用 text = "" 调用它

    【讨论】:

      猜你喜欢
      • 2019-03-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-18
      • 2020-02-23
      • 1970-01-01
      • 2018-04-08
      • 2020-06-12
      相关资源
      最近更新 更多