playwright-go icon indicating copy to clipboard operation
playwright-go copied to clipboard

Plugin support

Open tejaskumark opened this issue 1 year ago • 4 comments

Hello,

I want to use extra plugin stealth. I tried to check quickly on repo, but not able to find anything useful. Is there any way to get it working with playwright-go?

Side question - On a side note, is there anyway to accept browser notification in automated way as because of it sometimes flow is breaking and I am not able to find how to accept that. IMG_20231222_120541376

Thanks.

tejaskumark avatar Dec 22 '23 06:12 tejaskumark

  1. playwright-go won't support stealth. page.AddInitScript inject js may be useful.
  2. You can use BrowserContext.GrantPermission

canstand avatar Dec 22 '23 08:12 canstand

@canstand Thanks for the help.

  1. playwright-go won't support stealth. page.AddInitScript inject js may be useful. Answer - If possible can you please give exampe of.
  2. You can use BrowserContext.GrantPermission Answer - Issue here is, I do not want to grant permission and whenever I open page it gives this pop up and I am stuck over that page forever. As far as I understood playwright, id can not control this pop up as of now. Is my understanding correct?

tejaskumark avatar Dec 22 '23 08:12 tejaskumark

  1. try inject script here, but I didn't test
  2. reference upstream, for chromium

canstand avatar Dec 22 '23 13:12 canstand

@canstand Thanks for the help.

  • I can confirm that even after adding that script it does not work, also no error. I directly added this script
  • My goal was to automate join google meet automated way, but somehow google is able to distinguish between browser opened over CDP(it never start meet) vs manually opened(it will start joining process).
  • I wanted to suppress browser notification for firefox, somehow these two settings helped me media.navigator.enabled && media.navigator.permission.disabled, and now it doesn't show browser notification.

tejaskumark avatar Dec 23 '23 13:12 tejaskumark

Any upadte on this. It will be helpful if we have blockpermission along with grantpermission

ashirbadXcdify avatar Feb 24 '24 15:02 ashirbadXcdify

I can confirm inject JS works. https://github.com/playwright-community/playwright-go/issues/282#issuecomment-1194246553

canstand avatar Mar 22 '24 06:03 canstand