Created
January 10, 2018 09:53
-
-
Save AlexanderMoskovkin/897073929442db031d518e1e6db4ec9e to your computer and use it in GitHub Desktop.
TestCafe with ShadowDOM example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Selector } from 'testcafe'; | |
fixture `Shadow DOM Example` | |
.page `https://jsfiddle.net/txyamhcj/`; | |
test('Type inside shadowDOM', async t => { | |
const outputIframe = Selector('iframe').withAttribute('name', 'result'); | |
const shadowInput = Selector(() => document.querySelector('#host').shadowRoot.querySelector('#txtTest')); | |
await t | |
.switchToIframe(outputIframe) | |
.typeText(shadowInput, 'This is Shadow Input!'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment