Advertisement
dereksir

Untitled

Oct 16th, 2023 (edited)
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. //..
  2.  
  3.     // Create a new page
  4.     using var page = await browser.NewPageAsync();
  5.  
  6.     // Navigate to the target URL
  7.     await page.GoToAsync("https://httpbin.io/ip");
  8.  
  9.     // Retrieve the page content
  10.     var pageContent = await page.GetContentAsync();
  11.     Console.WriteLine(pageContent);
  12.  
  13.     // Close the browser when finished
  14.     await browser.CloseAsync();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement