Apify Discord Mirror

Updated 3 months ago

Log In instagram using facebook

At a glance

The community member is struggling to log into Instagram using Facebook with Playwright, specifically with a pop-up that appears to access the "Allow all cookies" button. Another community member suggests trying a different selector, [aria-label="Allow all cookies"]:not([aria-disabled="true"]), as the current selector may be clicking on a non-clickable span element. The community member notes that the proper answer could be lengthy, as modern websites may implement buttons in a way that requires further investigation. However, the second community member is confident that the suggested selector will work.

Useful resources
hello,
I try to log into instagram using facebook, using Playwright. I am struggling with a pop up. Miss the right timing, accessing the "Allow all cookies" button.
https://www.loom.com/share/a50934922679402cb46ecf59b80d88f7
Attachment
image.png
S
1 comment
@kirill Try clicking on this selector instead
Plain Text
[aria-label="Allow all cookies"]:not([aria-disabled="true"])


Simple answer - you are using wrong selector, you are trying to click span that is not clickable.

Proper answer is too long, you would need to check how modern websites implement some of their buttons as in your case it's a div with button role what means clicking the span that you are trying to click won't trigger any event as it's role there to just contain text with some specific styles.

I didn't try to reproduce your code, but I'm more than sure that it will work. Let me know If I'm right.
Add a reply
Sign up and join the conversation on Discord