【问题标题】:TestCafe DropDown selectorTestCafe 下拉选择器
【发布时间】:2020-03-25 19:36:58
【问题描述】:

我正在尝试在 testcafe 上选择一个动态下拉值。

“select2-result-label-7”的值与最后一个数字相同。我如何选择正确的下拉菜单?我尝试了模式匹配,但没有成功。

可以帮我解决这个问题

【问题讨论】:

    标签: javascript selenium testing automation testcafe


    【解决方案1】:

    这是文档中的一篇文章,描述了如何使用动态选择器:https://devexpress.github.io/testcafe/documentation/test-api/selecting-page-elements/examples-of-working-with-dom-elements.html#select-elements-with-dynamic-ids

    还请查看https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors 文章。您可以在那里找到很多如何使用动态属性的示例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-21
      • 2019-03-26
      • 1970-01-01
      • 1970-01-01
      • 2013-01-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多