量角器 - 如何单击可见元素外的灰色区域?

时间:2016-01-25 12:27:54

标签: jquery node.js selenium-webdriver jasmine protractor

我想点击灯箱外面的灰色区域,但每次我尝试这样做时都会收到以下例外情况:

UnknownError: unknown error: Element is not clickable at point (1864, 24). Other element would receive the click: <div class="md-dialog-container ng-scope" style="top: 0px; height: 979px;">...</div>

灯箱属性:

<md-dialog class="mobile-app-dialog-component md-transition-in" role="dialog" tabindex="-1" aria-describedby="dialog_49" aria-label="Search for ..." style="">
  <div class="title layout-align-start-center layout-row">
    <div class="md-title ng-binding flex">Get the App</div>
  </div>
  <md-dialog-content id="dialog_49">
    <div class="description font-smd ng-scope" translate="my_livesite.tasks.mobile_app_dialog.description">Search for vCita CRM on Google Play or App Store</div>
    <div class="buttons-container layout-align-center-center layout-row">
      <a class="apple-store-logo" href="https://itunes.apple.com/app/vcita-mobile-crm/id1025423769?mt=8" target="_blank"></a>
      <a class="google-store-logo" href="http://bit.ly/1PiUDGx" target="_blank"></a>
    </div>
  </md-dialog-content>
</md-dialog>

我试图运行的测试用例:

it('vCita New App - My-LiveSite - Preview - Menu', function() {
  var mobileDialog = element(by.css("a.google-store-logo"));
  browser.actions().mouseMove((mobileDialog), {x: -50, y: -50}).mouseDown().perform();
  browser.wait(EC.visibilityOf(element(by.css('button[ng-click="$mdOpenMenu()"]'))), 30000);
  $$('[ng-click="$mdOpenMenu()"]').last().click();
  browser.wait(EC.visibilityOf(element(by.css("md-menu-content.actions-bar-menu"))), 30000);
});

技术信息 量角器,Jasmine,WebDriver,最新的chromedriver。

0 个答案:

没有答案