【问题标题】:Enable to handle an element in html-5 using protractor允许使用量角器处理 html-5 中的元素
【发布时间】:2017-02-24 06:03:47
【问题描述】:

我是量角器的新手,我的要求是自动化第三方工具。 我无法检测到 Web 元素,元素的功能是单击它会更改其状态并从其他应用程序中提取数据,它正在更改其类值

来自

 ui-select-container ui-select-multiple select2 select2-container select2-container-multi ng-empty ng-valid ng-touched

 ui-select-container ui-select-multiple select2 select2-container select2-container-multi ng-empty ng-valid ng-touched select2-container-active select2-dropdown-open open

我对标签很好奇:

'select2-container-disabled 

它会以何种方式影响我的代码? 我尝试使用 xpath & ng 属性查找元素,但无法检测到元素,我找到了

ng-disabled="$select.disabled" 

我尝试了 css、xpath 和输入标记源代码。 你能建议我如何处理这个元素吗?

如果元素被禁用,我可以使用量角器中的一些代码来处理该元素

在此先感谢 :-)

【问题讨论】:

  • 你能分享你的 html sn-p 吗?
  • 我在这些代码 sn-ps 中都没有看到 select2-container-disabled

标签: angularjs selenium-webdriver protractor automated-tests


【解决方案1】:

如果它被禁用,则它不可点击。 isElementClickable 函数主要是测试一个元素是否被启用。

你也许可以从中刮取数据

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-15
    • 2018-05-23
    • 1970-01-01
    相关资源
    最近更新 更多