I am using C# and the Selenium Webdriver in Visual Studio 2017 to automate some tests. I am currently stuck with a test that fails to find an element after canceling an alert.
When I step through the code, I get an error indicating that Reflect.js could not be found:
Locating source for 'C:\src\nunit\nunit\src\NUnitFramework\framework\Internal\Reflect.cs'. Checksum: SHA1 {db ae 17 40 7a 46 56 f6 79 ee 5a 25 c7 7 94 f1 97 c1 a5 de} The file 'C:\src\nunit\nunit\src\NUnitFramework\framework\Internal\Reflect.cs' does not exist. Looking in script documents for 'C:\src\nunit\nunit\src\NUnitFramework\framework\Internal\Reflect.cs'... Looking in the Edit-and-Continue directory 'C:\GitLab\Automated-Testing\Selenium\SeleniumFramework\enc_temp_folder\'... The file with the matching checksum was not found in the Edit-and-Continue directory. Looking in the projects for 'C:\src\nunit\nunit\src\NUnitFramework\framework\Internal\Reflect.cs'. The file was not found in a project. Searching for documents embedded in the symbol file. An embedded document was not found. The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: C:\src\nunit\nunit\src\NUnitFramework\framework\Internal\Reflect.cs. The debugger could not locate the source file 'C:\src\nunit\nunit\src\NUnitFramework\framework\Internal\Reflect.cs'.
My suspicion is that something about canceling the alert caused NUnit to lose track of its Reflect.js file. Here is the CancelAlert code:
public static void CancelAlert()
{
Driver.SwitchTo().Alert().Dismiss();
}
Anyone have any ideas as to how I can get past this this error?