首页 > 解决方案 > 未单击按钮(硒 c#)

问题描述

只是尝试下面的代码点击导出按钮,它没有点击按钮

driver.FindElement(By.XPath("//span[@class='ui-button-text' and contains(.,'Export')]")).Click();

外部 HTML 代码

出口

<span class="ui-button-text" style="">Export</span>

标签: c#seleniumselenium-webdriver

解决方案


利用

driver.FindElement(By.XPath("//span[@class='ui-button-text' and contains(.,'Export')]")).click();

(小写click())。


推荐阅读