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()
76
76
printOptions . ShrinkToFit = true ;
77
77
bool currentShrinkToFit = printOptions . ShrinkToFit ;
78
78
}
79
- }
80
79
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
+ }
81
90
}
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
205
205
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}}
206
206
{{< /tab >}}
207
207
{{< tab header="CSharp" >}}
208
- {{< badge-code >}}
208
+ {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}}
209
209
{{< /tab >}}
210
210
{{< tab header="Ruby" >}}
211
211
{{< 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
205
205
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}}
206
206
{{< /tab >}}
207
207
{{< tab header="CSharp" >}}
208
- {{< badge-code >}}
208
+ {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}}
209
209
{{< /tab >}}
210
210
{{< tab header="Ruby" >}}
211
211
{{< 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
205
205
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}}
206
206
{{< /tab >}}
207
207
{{< tab header="CSharp" >}}
208
- {{< badge-code >}}
208
+ {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}}
209
209
{{< /tab >}}
210
210
{{< tab header="Ruby" >}}
211
211
{{< badge-implementation >}}
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ Selenium 通过其 PrintOptions、PrintsPage 和 browsingContext 类简化了这
201
201
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}}
202
202
{{< /tab >}}
203
203
{{< tab header="CSharp" >}}
204
- {{< badge-code >}}
204
+ {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}}
205
205
{{< /tab >}}
206
206
{{< tab header="Ruby" >}}
207
207
{{< badge-implementation >}}
You can’t perform that action at this time.
0 commit comments