File tree Expand file tree Collapse file tree 5 files changed +14
-5
lines changed
examples/dotnet/SeleniumDocs/Interactions
website_and_docs/content/documentation/webdriver/interactions Expand file tree Collapse file tree 5 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,15 @@ public void TestShrinkToFit()
7676 printOptions . ShrinkToFit = true ;
7777 bool currentShrinkToFit = printOptions . ShrinkToFit ;
7878 }
79- }
8079
80+ [ TestMethod ]
81+ public void PrintWithPrintsPageTest ( )
82+ {
83+ WebDriver driver = new ChromeDriver ( ) ;
84+ driver . Navigate ( ) . GoToUrl ( "https://www.selenium.dev/" ) ;
85+ PrintOptions printOptions = new PrintOptions ( ) ;
86+ PrintDocument printedPage = driver . Print ( printOptions ) ;
87+ Assert . IsTrue ( printedPage . AsBase64EncodedString . StartsWith ( "JVBER" ) ) ;
88+ }
89+ }
8190}
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B
205205{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}}
206206{{< /tab >}}
207207{{< tab header="CSharp" >}}
208- {{< badge-code >}}
208+ {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}}
209209{{< /tab >}}
210210{{< tab header="Ruby" >}}
211211{{< badge-implementation >}}
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B
205205{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}}
206206{{< /tab >}}
207207{{< tab header="CSharp" >}}
208- {{< badge-code >}}
208+ {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}}
209209{{< /tab >}}
210210{{< tab header="Ruby" >}}
211211{{< badge-implementation >}}
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B
205205{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}}
206206{{< /tab >}}
207207{{< tab header="CSharp" >}}
208- {{< badge-code >}}
208+ {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}}
209209{{< /tab >}}
210210{{< tab header="Ruby" >}}
211211{{< badge-implementation >}}
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ Selenium 通过其 PrintOptions、PrintsPage 和 browsingContext 类简化了这
201201{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}}
202202{{< /tab >}}
203203{{< tab header="CSharp" >}}
204- {{< badge-code >}}
204+ {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}}
205205{{< /tab >}}
206206{{< tab header="Ruby" >}}
207207{{< badge-implementation >}}
You can’t perform that action at this time.
0 commit comments