Last active
March 6, 2020 09:13
-
-
Save daleharvey/a1658a2961eb606fed8b6a6b6f78aa59 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// searchItem.click() will load a page, I want to Assert that page does not | |
// have the text 'error' in it | |
// Fails on treeherder with | |
// Uncaught exception - at chrome://mochitests/content/browser/browser/components/search/test/browser/browser_contextmenu.js:126 - TypeError: can't access property "innerHTML", content.document.body is null | |
let loaded = BrowserTestUtils.waitForNewTab(win.gBrowser, expectedBaseUrl); | |
searchItem.click(); | |
let searchTab = await loaded; | |
let browser = win.gBrowser.selectedBrowser; | |
await SpecialPowers.spawn(browser, [], async function() { | |
Assert.ok( | |
!/error/.test(content.document.body.innerHTML), | |
"Ensure there were no errors loading the search page" | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment