I have recorded a few test cases using selenium IDE.I have exported these testcase in the c#(nunit) language.Since the testcases has to be compiled into a .dll file , i created a library project using visual studio community and pasted my testcases into that project.Then i build this project for generating all the necessary .dll files needed to run the testcase from azure.After this i pushed the entire library project folder into azure repos(along with the DLL files).Unfortunately when i run my pipeline, it keeps failing at the task "VsTest - testAssemblies".
Error message from azure logs-
Running all tests in d:\a\1\s\chrometest\chrometest\bin\Debug\chrometest.dll
NUnit3TestExecutor converted 1 of 1 NUnit test cases
X createnewfolderonly [18s 200ms]
Error Message:
OpenQA.Selenium.NoSuchElementException : no such element: Unable to locate element: {"method":"css selector","selector":".butt > span"}
(Session info: chrome=80.0.3987.132)
Stack Trace:
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElementByCssSelector(String cssSelector)
at OpenQA.Selenium.By.<>c__DisplayClass23_0.<CssSelector>b__0(ISearchContext context)
at OpenQA.Selenium.By.FindElement(ISearchContext context)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by)
at DefaultSuiteTest.createnewfolderonly() in C:\Users\Admin\source\repos\chrometest\chrometest\chrometestpage.cs:line 33
Note: I am able to run the dll directly through vstest.console.exe on my local machine using the command promp without any issue and i dont get any of these errors.I am also able to see the automation happening after this.Why can't i do the same from the azure pipelines?Plz help