Esto es lo más frustrado que he estado en mucho tiempo. Estoy escribiendo pruebas en Javascript (Transportador) y solo quiero que haga clic en los elementos de mi página. Probablemente el 10% (o menos) de las veces funciona correctamente, el otro 90% de las veces aparece este error:
Failed: element click intercepted: Element is not clickable at point (x,y)
Sí. He visto otras publicaciones sobre esto y he probado todas las "soluciones", pero ninguna de ellas funciona el 100% del tiempo.
it('Full Width Video test', async() => { const fwv = await blocks.fullWidthVideo; browser.executeScript("arguments[0].scrollIntoView(true);", fwv); await expect(await fwv).toBeDisplayed(); await expect(await blocks.fullWidthVideoImg).toBeDisplayed(); // tried this // browser.manage().timeouts().implicitlyWait(10000) // also tried this // const EC = new protractor.ProtractorExpectedConditions(); // await browser.wait(EC.elementToBeClickable( // element(blocks.fullWidthVideoImg))), // 5000,' item is not clickable after 5 seconds'); // also also tried this // let ele = browser.findElement(blocks.fullWidthVideoImg)); // browser.actions().mouseMove(ele).click().perform(); await blocks.fullWidthVideoImg.click(); await expect(await blocks.fullWidthVideoIframe).toBeDisplayed(); }); export class Blocks { // Full Width Video get fullWidthVideo() { return element(by.xpath('//div[@data-test="fullwidthvideo"]')) } get fullWidthVideoImg() { const fwv = this.fullWidthVideo; return fwv.element(by.xpath('./div[@data-test="video-img"]'))) } get fullWidthVideoIframe() { const fwv = this.fullWidthVideo; return fwv.element(by.xpath('./div[@data-test="video-iframe"]'))) } }