【发布时间】:2019-01-25 14:51:48
【问题描述】:
当我在 CheckBox 元素上使用 [VerifyExists] 时收到错误消息,但当我使用通过框架生成的 XPath 时,我可以找到该元素。
错误信息:
Message: OpenQA.Selenium.NoSuchElementException : Unable to locate element: By.XPath: .//*[normalize-space(@id) = 'active-checker']/descendant-or-self::input[@type='checkbox']
实施:
[VerifyExists]
[FindById("isCommentRequred-checker")]
public CheckBox<_> RequestsWorklogCommentCheckBox { get; private set; }
手动搜索元素:
【问题讨论】:
标签: c# automated-tests ui-automation atata