1

Need to perform right click of a button in a website in C# using puppeteersharp. Tried the below code but it is not working:

await page.ClickAsync({ button: 'right'}"[class*='_16aPYHYIOVxzNYTA4BGnwS NJVykX0WljoRws2qTYI5G _3FwRpWCSns-2PgbiDhEErG']");

Platypus
  • 321
  • 1
  • 4
  • 17
Harsh Raj
  • 63
  • 3

1 Answers1

0

You can use the ClickOptions argument:

await page.ClickAsync(
    "[class*='_16aPYHYIOVxzNYTA4BGnwS NJVykX0WljoRws2qTYI5G _3FwRpWCSns-2PgbiDhEErG']", 
    new ClickOptions() { Button = MouseButton.Right } );
hardkoded
  • 18,915
  • 3
  • 52
  • 64