Skip to content
Advertisement

Tag: playwright

How do you match against an OR case in Playwright?

The Playwright documentation says “Comma-separated list of CSS selectors will match all elements that can be selected by one of the selectors in that list.” but it doesn’t work. If I do this: it matches, but if I do this: it hangs Is this not a “CSS selector”? how do I do the equivalent properly? Answer Yes, this is not

Playwright auto-scroll to bottom of infinite-scroll page

I am trying to automate the scraping of a site with “infinite scroll” with Python and Playwright. The issue is that Playwright doesn’t include, as of yet, a scroll functionnality let alone an infinite auto-scroll functionnality. From what I found on the net and my personnal testing, I can automate an infinite or finite scroll using the page.evaluate() function and

Playwright Select frame with dynamic name

I need to access an iframe in playwright that has a name that is automatically generated. The iframe’s name is always prefixed by “__privateStripeFrame” and then a randomly generated number How i can access the frame with the page.frame({name: }) ? From the docs it seems like i can’t use a regular expression! Answer The frameSelector doesn’t need be specified

Unable to get isDisabled() to work in Playwright

I need to check that a button is disabled (checking for a last page of a table). There are two with the same id (top and bottom of the table). But when I do the above I get: elementHandle.isDisabled: Unable to adopt element handle from a different document. Why doesn’t this work? Answer So, this works:

getAttribute is not available on the ElementHandle

I’m using playwright version 0.13.0, I have an instance of ElementHandle, but the getAttribute function is not available, calling it throws an error saying getAttribute is not a function: I double-checked with the debugger, the function is not on the instance. Also, there’s no equivalent of page.evaluate function for ElementHandle Answer You can pass it as an argument to the

Advertisement