I am trying to set up some automated tests for a Microsoft Dynamics CRM inhouse application. For this, I am using C# (Visual Studio 2017), Selenium (Version 3.14), as well as EasyRePro, and ChromeDriver 74.0.3729.6.
The problem that I am having is when I try to do a second Browser.Grid.Switchview within my code I get the following error "Exception Experienced: OpenQA.Selenium.ElementClickInterceptedException: element click intercepted: Element ... is not clickable at point (211, 38). Other element would receive the click:"
I have tried a number of different ways to not get the "Exception Experienced: OpenQA.Selenium.ElementClickInterceptedException: element click intercepted: Element ... is not clickable at point (211, 38). Other element would receive the click:". These include adding;
_browser.Grid.Refresh();
_browser.Grid.ClearSearch();
between the two "_browser.Grid.SwitchView"
I have also tried to first reopen the subarea by navigating to the subarea again like this
_browser.Navigation.OpenSubArea("RibbonValue", "SubAreaValue");
between the two "_browser.Grid.SwitchView"
Then I tried first going to AnotherSubAreaValue and then going back to the SubAreaValue.
_browser.Navigation.OpenSubArea("RibbonValue", "AnotherSubAreaValue");
_browser.Navigation.OpenSubArea("RibbonValue", "SubAreaValue");
between the two "_browser.Grid.SwitchView"
My code is as follows;
MyExtentReport _myReport;
Browser _browser;
IWebDriver _driver;
try{
//Test start
//LogInfo --> start building an HTML report page
_browser.Navigation.OpenSubArea("RibbonValue", "SubAreaValue");
_myReport.LogInfo("NAVIGATE: RibbonValue > SubAreaValue");
_browser.ThinkTime(200);
try{
// Switch the screen to the first grid view
// LogPass --> this will record the test as a pass and take a screenshot and output to the HTML report page we are building.
_browser.Grid.SwitchView("First Grid View");
_browser.ThinkTime(2000);
_myReport.LogPass(testCaseName + "This test Passed " + "\"" + "First Grid View" + "\" view is available");
_browser.ThinkTime(2000);
} catch (InvalidOperationException ex){
_myReport.LogFail(testCaseName + "This test Failed " + "\"" + "First Grid View" + "\" view is NOT available");
_browser.ThinkTime(2000);
}
try{
// Switch the screen to the first grid view
// LogPass --> this will record the test as a pass and take a screenshot and output to the HTML report page we are building.
_browser.Grid.SwitchView("Second Grid View");
_browser.ThinkTime(2000);
_myReport.LogPass(testCaseName + "This test Passed " + "\"" + "Second Grid View" + "\" view is available");
_browser.ThinkTime(2000);
} catch (InvalidOperationException ex){
_myReport.LogFail(testCaseName + "This test Failed " + "\"" + "Second Grid View" + "\" view is NOT available");
_browser.ThinkTime(200);
}
} catch (Exception e){
_myReport.LogError("Exception Experienced: " + e);
}
I would expect that the _browser.Grid.SwitchView should switch between the various views that are being requested on a particular Microsoft Dynamics CRM Sub Area.