Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ public void TestShrinkToFit()
printOptions.ShrinkToFit = true;
bool currentShrinkToFit = printOptions.ShrinkToFit;
}
}

[TestMethod]
public void PrintWithPrintsPageTest()
{
WebDriver driver = new ChromeDriver();
driver.Navigate().GoToUrl("https://www.selenium.dev/");
PrintOptions printOptions = new PrintOptions();
PrintDocument printedPage = driver.Print(printOptions);
Assert.IsTrue(printedPage.AsBase64EncodedString.StartsWith("JVBER"));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-implementation >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-implementation >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-implementation >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Selenium 通过其 PrintOptions、PrintsPage 和 browsingContext 类简化了这
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-implementation >}}
Expand Down
Loading