<commit_before>/**
 * Select block in editor by clicking on it.
 *
 * @param {string} className Class name to select by.
 */
export async function selectBlockByClassName( className ) {
	// We have to select the page first and then the block inside.
	await page.click( '.amp-page-active' );
	await page.click( `.${ className }` );
}<commit_msg>Add waitForSelector-s<commit_after>/**
 * Select block in editor by clicking on it.
 *
 * @param {string} className Class name to select by.
 */
export async function selectBlockByClassName( className ) {
	// We have to select the page first and then the block inside.
	const pageSelector = '.amp-page-active';
	await page.waitForSelector( pageSelector );
	await page.click( pageSelector );

	const blockSelector = `.${ className }`;
	await page.waitForSelector( blockSelector );
	await page.click( blockSelector );
}
{'fraction_non_alphanumeric': 0.1127906976744186, 'fraction_numerical': 0.0, 'mean_word_length': 4.125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6637222', 'n_tokens_mistral': 242, 'n_tokens_neox': 245, 'n_words': 93}