Jasmine 量角器和茉莉花:有了firefox,我可以´;不要单击按钮,因为另一个元素将其遮挡

Jasmine 量角器和茉莉花:有了firefox,我可以´;不要单击按钮,因为另一个元素将其遮挡,jasmine,protractor,Jasmine,Protractor,我无法点击按钮: // tslint:disable-next-line:no-shadowed-variable elementToClick.isEnabled().then(function(isEnabled) { if (isEnabled) { console.log('button enabled'); browser. wait(protractor.ExpectedConditions.elementToBeClickable(elementToCl

我无法点击按钮:

// tslint:disable-next-line:no-shadowed-variable
elementToClick.isEnabled().then(function(isEnabled) {
  if (isEnabled) {
    console.log('button enabled');
    browser.
    wait(protractor.ExpectedConditions.elementToBeClickable(elementToClick), 50000)
      .then(function() {
        elementToClick.click();
      });
  }
});
单击失败原因:

失败:元素在点(1781.908317565918887)处不可单击,因为另一个元素遮挡了它

你知道为什么吗


modal fade show d-block类位于button div顶部。

我曾经遇到过同样的问题,它发生在google chrome和仅使用同一引擎的浏览器上。我被迫添加睡眠。我正在使用firefox。我之前添加了一个浏览器。sleep(10000),但没有解决它。此问题仅在firefox中发生。请尝试通过
browser.executeScript('arguments[0]。click()',element)单击该元素