MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / Print

Method Print

dotnet/src/webdriver/WebDriver.cs:370–379  ·  view source on GitHub ↗

Gets a object representing a PDF-formatted print representation of the page. A object describing the options of the printed document. The object containing the PDF-formatted print representation of the page. <exception cref="ArgumentNullExcep

(PrintOptions printOptions)

Source from the content-addressed store, hash-verified

368 /// <returns>The <see cref="PrintDocument"/> object containing the PDF-formatted print representation of the page.</returns>
369 /// <exception cref="ArgumentNullException">If <paramref name="printOptions"/> is <see langword="null"/>.</exception>
370 public PrintDocument Print(PrintOptions printOptions)
371 {
372 ArgumentNullException.ThrowIfNull(printOptions);
373
374 Response commandResponse = this.Execute(DriverCommand.Print, printOptions.ToDictionary());
375
376 commandResponse.EnsureValueIsNotNull();
377 string base64 = commandResponse.Value.ToString()!;
378 return new PrintDocument(base64);
379 }
380
381 /// <summary>
382 /// Performs the specified list of actions with this action executor.

Callers 3

CanPrintPageMethod · 0.45
CanPrintTwoPagesMethod · 0.45

Calls 5

ExecuteMethod · 0.95
ThrowIfNullMethod · 0.80
EnsureValueIsNotNullMethod · 0.80
ToDictionaryMethod · 0.45
ToStringMethod · 0.45

Tested by 3

CanPrintPageMethod · 0.36
CanPrintTwoPagesMethod · 0.36