0

enter image description here

How do I select the "Acknowleg " option of my ComboBox "Acknowleg Type"?

I tried the following code:

var test = new SelectElement(_driver.FindElement(By.Name("Activity Type")));
test.SelectByText("Acknowlege");
_driver.FindElementByCssSelector("#divFormTemplate > div.simpleWorkflowContainer > div.simpleWorkflow > table:nth-child(2) > tbody > tr:nth-child(1) > td:nth-child(2) > select > option:nth-child(2)").Click();

var test = new SelectElement(_driver.FindElementByXPath("//*[@id=\"divFormTemplate\"]/div[2]/div[2]/table[1]/tbody/tr[1]/td[2]/select/option[2]"));
test.SelectByText("Acknowlege");
 _driver.FindElementByXPath("//select[@class='relative']/option[@value='285']").Click();

c# Error Code "no such element: Unable to locate element: "

2
  • You have the website link? – PDHide Jan 31 at 20:11
  • Only local pc is accessible. – Picker Feb 2 at 3:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.