I am running c# Unit Tests through Windows Jenkins and while executing tests console output window shows me same error for all the tests:
Error Message: Test method Levan_Test threw exception: System.ComponentModel.Win32Exception: Access is denied Stack Trace: at System.Windows.Forms.SendKeys.SendInput(Byte[] oldKeyboardState, Queue previousEvents) at System.Windows.Forms.SendKeys.Send(String keys, Control control, Boolean wait) at System.Windows.Forms.SendKeys.SendWait(String keys)
It looks like there is some problem with permissions or power shell command execution.
code snippet:
Thread.Sleep(1000);
driver.FindElement(By.XPath("//*[@id=\"solutionsDropdown\"]/div/i")).Click();
Thread.Sleep(1000);
driver.FindElement(By.XPath("//*[@id=\"solutionsDropdown\"]/ul/li[2]/a")).Click();
Thread.Sleep(1000);
SendKeys.SendWait("{Enter}");