Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

feat(webkit): roll to 1269 (#2486)

Joel Einbinder28e0ce1bb17c
diff --git a/test/emulation.spec.js b/test/emulation.spec.js
index f6a659e110..4e4d348495 100644
--- a/test/emulation.spec.js
+++ b/test/emulation.spec.js
@@ -16,7 +16,7 @@
*/
const utils = require('./utils');
-const {FFOX, CHROMIUM, WEBKIT} = utils.testOptions(browserType);
+const {FFOX, CHROMIUM, WEBKIT, LINUX} = utils.testOptions(browserType);
const iPhone = playwright.devices['iPhone 6'];
const iPhoneLandscape = playwright.devices['iPhone 6 landscape'];
@@ -206,6 +206,22 @@ describe.skip(FFOX)('Page.emulate', function() {
expect(await page.evaluate(() => result)).toBe('Clicked');
await context.close();
});
+ it('should scroll to click', async({browser, server}) => {
+ const context = await browser.newContext({
+ viewport: {
+ width: 400,
+ height: 400,
+ },
+ deviceScaleFactor: 1,
+ isMobile: true
+ });
+ const page = await context.newPage();
+ await page.goto(server.PREFIX + '/input/scrollable.html');
+ const element = await page.$('#button-91');
+ await element.click();
+ expect(await element.textContent()).toBe('clicked');
+ await context.close();
+ });
});
describe('Page.emulateMedia type', function() {