无法在 Selenium + C# 中 select 我想要的特定列表
Can't able to select a specific list that I want in Selenium + C#
实际上,我想 select 将我想要的特定列表放入容器中。但是我尝试用下面的代码编写但它没有反映:
Actions actions = new Actions(driver);
IWebElement mainMenu = driver.FindElement(By.XPath("//*[@id='requestItemSFHD-24']"));
actions.MoveToElement(mainMenu).Build().Perform();
actions.MoveToElement(mainMenu).Click();
谁能帮我解决这个问题?谢谢
enter image description here
Actions actions = new Actions(driver);
IWebElement mainMenu = driver.FindElement(By.ClassName("requestItem-target"));
actions.MoveToElement(mainMenu).Build().Perform();
driver.FindElements(By.ClassName("requestItem-target")).ElementAt(1).Click();
实际上,我想 select 将我想要的特定列表放入容器中。但是我尝试用下面的代码编写但它没有反映:
Actions actions = new Actions(driver);
IWebElement mainMenu = driver.FindElement(By.XPath("//*[@id='requestItemSFHD-24']"));
actions.MoveToElement(mainMenu).Build().Perform();
actions.MoveToElement(mainMenu).Click();
谁能帮我解决这个问题?谢谢
enter image description here
Actions actions = new Actions(driver);
IWebElement mainMenu = driver.FindElement(By.ClassName("requestItem-target"));
actions.MoveToElement(mainMenu).Build().Perform();
driver.FindElements(By.ClassName("requestItem-target")).ElementAt(1).Click();