This commit is contained in:
Darren Ethier 2020-06-23 09:22:18 -04:00 committed by GitHub
parent 3fae904643
commit 1953d4f96a
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ export async function visitBlockPage( title ) {
await page.type( '#post-search-input', title );
await page.click( '#search-submit', { waitUntil: 'domcontentloaded' } );
const pageLink = await page.$x( `//a[contains(text(), '${ title }')]` );
if ( ( await pageLink.length ) > 0 ) {
if ( pageLink.length > 0 ) {
// clicking the link directly caused racing issues, so I used goto.
link = await page.evaluate(
( a ) => a.getAttribute( 'href' ),