while passing the incident ticket number updating worknotes and changing the ticket state to resolved and click on update button,getting an exception

Lydia Bernadat Mary S 1 Reputation point
2021-11-25T13:33:01.143+00:00

i wants to get the control for passing the ticket number in search bar and update the worknotes field and needs to change the state field to resolved and click on update button.i have tried but its shows (no such element found exception).kindly help me in this case.i have attached my sample code that i have tried.i have used seleniumc#. code:

WebDriverWait wait1 = new WebDriverWait(driver, TimeSpan.FromSeconds(20));
wait1.Until(ExpectedConditions.ElementExists(By.Id("sysparm_search")))
.sendkeys("INC0008111" + Keys.Enter);
WebDriverWait wait2 = new WebDriverWait(driver, TimeSpan.FromSeconds(20));
wait2.Until(ExpectedConditions.ElementExists(By.Id("activity-stream-textarea")))
.SendKeys("closing the request");
SelectElement se = new SelectElement(driver.FindElement(By.Name("incident.state"))); se.SelectByIndex(3);
IWebElement ele4 = driver.FindElement(By.Id("resolve_incident"));
ele4.Click();152617-code6-li.jpg

152599-code7-li.jpg

152645-code8-li.jpg

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,235 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jack J Jun 24,286 Reputation points Microsoft Vendor
    2021-11-26T03:08:11.923+00:00

    @Lydia Bernadat Mary S , we noted that you are using selenium, it is a 3rd party product, I recommend that you could post your question in Github.

    0 comments No comments