Page 1 of 1

Permission detect

Posted: Sun Apr 23, 2023 7:06 am
by dilfich
Hi!
Is it possible to change permissions?

https://intoli.com/blog/not-possible-to-block-chrome-headless/chrome-headless-test.html

How to do it correctly?

Code: Select all

  TempDict.SetString('name', 'camera');
  TempParams.SetDictionary('permission', TempDict);

  TempList.SetString('granted');
  TempParams.SetValue('setting', TempList);

  Chrom.ExecuteDevToolsMethod(0, 'Browser.setPermission', TempParams);
Or maybe something else like that?

Code: Select all

driver.executeCdpCommand("Browser.grantPermissions", Map.of("permissions", asList("audioCapture")));
How are there not enough examples of creating structures, nested parameters are the most incomprehensible. :(