[英]Unable to locate element -- OpenQA.Selenium.NoSuchElementException
[英]OpenQA.Selenium.NoSuchElementException :Unable to find element with id
webdriver代碼無法在C#中與
Driver.FindElement(By.LinkText("portletComponentWorkList_viewNormalModeWorkList_viewPanel_showFiltersLink")).Click();
我已經嘗試過
Driver.FindElement(By.id
但它不起作用,並且我在visualstudio錯誤消息中遇到以下錯誤:
OpenQA.Selenium.NoSuchElementException : Unable to find element with id == portletComponentWorkList_viewNormalModeWorkList_viewPanel_showFiltersLink
錯誤堆棧跟蹤:
OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value)
OpenQA.Selenium.Remote.RemoteWebDriver.FindElementById(String id)
OpenQA.Selenium.By.<>c__DisplayClass2.<Id>b__0(ISearchContext context)
OpenQA.Selenium.By.FindElement(ISearchContext context)
OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by)
SeleniumTests.ReviewCase.TheReviewCaseTest() in C:\Automation\CSharp\SpecExperiment\SpecExperiment\UnitTest2.cs: line 46
嘗試Driver.FindElement(By.LinkText("Show filters")).Click();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.