Skip to content

Instantly share code, notes, and snippets.

@manoj9788
Last active June 5, 2018 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manoj9788/0bc133a835c9f58e3fc8324e238563ba to your computer and use it in GitHub Desktop.
Save manoj9788/0bc133a835c9f58e3fc8324e238563ba to your computer and use it in GitHub Desktop.
const assert = require('assert');
const {Builder, By, promise, until} = require('selenium-webdriver');
const {Eyes, Target} = require('eyes.selenium');
promise.USE_PROMISE_MANAGER = false;
describe('Frame Test', function() {
let driver;
let eyes;
beforeEach(async function() {
eyes = new Eyes();
eyes.setApiKey("your key");
driver = await new Builder().forBrowser('chrome').build();
});
afterEach(async function() {
await driver.quit();
});
it('nested_frames', async function() {
await eyes.open(driver, 'Google Page', 'GoogleTestPage', {width: 1000, height: 700});
await driver.get("http://the-internet.herokuapp.com/dynamic_content");
await eyes.checkWindow("landingPage");
await eyes.check("TestIgnore", await Target.window().ignore(By.css('#content > div:nth-child(4) > div.large-10.columns')));
await eyes.close();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment