Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/303.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Microsoft Dynamics CRM EasyRePro自动测试错误-元素ClickInterceptedException_C#_Selenium_Selenium Webdriver_Easyrepro - Fatal编程技术网

C# Microsoft Dynamics CRM EasyRePro自动测试错误-元素ClickInterceptedException

C# Microsoft Dynamics CRM EasyRePro自动测试错误-元素ClickInterceptedException,c#,selenium,selenium-webdriver,easyrepro,C#,Selenium,Selenium Webdriver,Easyrepro,我正在尝试为Microsoft Dynamics CRM内部应用程序设置一些自动化测试。为此,我使用了C#(Visual Studio 2017)、Selenium(3.14版)、EasyRePro和ChromeDriver 74.0.3729.6 我遇到的问题是,当我尝试在代码中执行第二个Browser.Grid.Switchview时,我得到以下错误“遇到异常:OpenQA.Selenium.element ClickInterception:element ClickInterceptio

我正在尝试为Microsoft Dynamics CRM内部应用程序设置一些自动化测试。为此,我使用了C#(Visual Studio 2017)、Selenium(3.14版)、EasyRePro和ChromeDriver 74.0.3729.6

我遇到的问题是,当我尝试在代码中执行第二个Browser.Grid.Switchview时,我得到以下错误“遇到异常:OpenQA.Selenium.element ClickInterception:element ClickInterception:element…在点(211,38)处不可单击。其他元素将收到该单击:”

我尝试了许多不同的方法来避免“异常体验:OpenQA.Selenium.element ClickInterception:element click Interception:element click Interception:element…在点(211,38)处不可单击。其他元素将收到单击:”。包括加入,

_browser.Grid.Refresh();
_browser.Grid.ClearSearch();
在两个“\u browser.Grid.SwitchView”之间

我也尝试过先重新打开分区,再像这样导航到分区

   _browser.Navigation.OpenSubArea("RibbonValue", "SubAreaValue");
在两个“\u browser.Grid.SwitchView”之间

然后我尝试先转到另一个子区域值,然后再返回子区域值

   _browser.Navigation.OpenSubArea("RibbonValue", "AnotherSubAreaValue");
   _browser.Navigation.OpenSubArea("RibbonValue", "SubAreaValue");
在两个“\u browser.Grid.SwitchView”之间

我的代码如下

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);
 }

我希望_browser.Grid.SwitchView应该在特定Microsoft Dynamics CRM子区域上请求的各种视图之间切换。

这意味着您尝试单击的元素顶部(覆盖)有一个元素。发布标记。或者您可以尝试使用js click,仅供参考。这意味着在您尝试单击的元素的顶部(覆盖)有一个元素。发布标记。或者,您可以尝试使用js单击,以供参考。