enable w3c for chrome

This commit is contained in:
Dzmitry Lemechko 2020-04-04 10:53:36 +03:00
parent 8c06b12212
commit a984cbef71
2 changed files with 7 additions and 4 deletions

View file

@ -130,20 +130,23 @@ export function DiscoverPageProvider({ getService, getPageObjects }: FtrProvider
public async clickHistogramBar() {
const el = await elasticChart.getCanvas();
const x = browser.isW3CEnabled ? 0 : 200;
await browser
.getActions()
.move({ x: 200, y: 20, origin: el._webElement })
.move({ x, y: 20, origin: el._webElement })
.click()
.perform();
}
public async brushHistogram() {
const el = await elasticChart.getCanvas();
const x1 = browser.isW3CEnabled ? -300 : 200;
const x2 = browser.isW3CEnabled ? -100 : 400;
await browser.dragAndDrop(
{ location: el, offset: { x: 200, y: 20 } },
{ location: el, offset: { x: 400, y: 30 } }
{ location: el, offset: { x: x1, y: 20 } },
{ location: el, offset: { x: x2, y: 30 } }
);
}

View file

@ -107,7 +107,7 @@ async function attemptToCreateCommand(
chromeOptions.push('headless', 'disable-gpu', 'remote-debugging-port=9222');
}
chromeCapabilities.set('goog:chromeOptions', {
w3c: false,
w3c: true,
args: chromeOptions,
});
chromeCapabilities.set('goog:loggingPrefs', { browser: 'ALL' });