I had several Selenide automated test web sites which have Google Vignette. The google vignette have different iframe id. I cannot close it using automation code due to different google vignette button and different iframe id.
What is the solution here? Somebody suggest walking through the blur() styling but how? Any other solutions? Thanks.
You can wait with retries for google ads via JS script and remove it from DOM if it appeared.
Locator for Google Ads looks like
[id*=google_ads_iframe],[id*=ad_iframe]
So, you call
querySelector
on this element. If it exists - remove it, else retry after 1 second.Test resource with google vignette