I'm using sitespeed io and selenium + javascript to load test a web page. When I switched to an iframe with an embedded YouTube player, I got an error.
Error: ERROR: [plugin.browsertime]https://www.youtube.com/embed
generated the following errors in the coach {
"performance": {
"firstContentfulPaint": "Cannot read properties of undefined (reading 'startTime')",
"longTasks": "Cannot read properties of undefined (reading 'startTime')"
}
Code:
const iframe = await driver.findElement(webdriver.By.id('widget2'));
await driver.switchTo().frame(iframe);//Error Happens here