您尝试过的定位器看起来不正确,您应该尝试使用xpath
和文本来定位所需元素,如下所示:-
_driver.FindElement(By.XPath(".//div[text()='HH3']")).Click();
尝试_driver.FindElement(By.XPath("//div[contains(text()='HH3')]")).Click();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.