Open eirikur-grid opened 4 years ago
I've been able to verify that this is doable. Here's a simple function that loads a page and then clicks an element when it becomes available.
async def open_page(browser, url: str, click_selector: Optional[str]):
page = await browser.newPage()
await page.goto(url)
if click_selector is not None:
e = await page.waitFor(click_selector)
await e.click()
I've tested it with the following selectors:
div.dashboard_header_tv-mode-buttons
//div[text()='Enter TV Mode']
Both datadog and amplitude have TV modes. As far as I understand, the Amplitude TV mode cannot be enabled via querystring. It might be possible to automate the clicking of this TV-mode button. We could attempt a generic search for a clickable element mentioning 'TV' or we could extend the config, making it possible to specify a CSS selector or something similar that points to an element that should be clicked.