Skip to content

Commit

Permalink
Add java alerts code from examples to code snippet section in seleni… (
Browse files Browse the repository at this point in the history
…#2094)[deploy site]

* Add  java alerts code from examples to code snippet section in selenium docs (alerts.en.md)

* updated correct line number
  • Loading branch information
praveenmar authored Dec 8, 2024
1 parent 862708e commit 4567a5a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ WebDriver can get the text from the popup and accept or dismiss these
alerts.

{{< tabpane langEqualsHeader=true >}}
{{< badge-examples >}}
{{< tab header="Java" text=true >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L56" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L57" >}}
{{< /tab >}}

{{< tab header="Python" text=true >}}
Expand Down Expand Up @@ -77,9 +76,8 @@ a sample confirm</a>.
This example also shows a different approach to storing an alert:

{{< tabpane langEqualsHeader=true >}}
{{< badge-examples >}}
{{< tab header="Java" text=true >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L71" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L72" >}}
{{< /tab >}}

{{< tab header="Python" text=true >}}
Expand Down Expand Up @@ -137,9 +135,8 @@ See a sample prompt</a>.


{{< tabpane langEqualsHeader=true >}}
{{< badge-examples >}}
{{< tab header="Java" text=true >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L87" >}}
{{< tab header="Java" text=true >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L88" >}}
{{< /tab >}}

{{< tab header="Python" text=true >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ WebDriverはポップアップからテキストを取得し、これらのア

{{< tabpane langEqualsHeader=true >}}
{{< tab header="Java" text=true >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L56" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L57" >}}
{{< /tab >}}

{{< tab header="Python" text=true >}}
Expand Down Expand Up @@ -72,7 +72,7 @@ alert.accept()

{{< tabpane langEqualsHeader=true >}}
{{< tab header="Java" text=true >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L71" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L72" >}}
{{< /tab >}}

{{< tab header="Python" text=true >}}
Expand Down Expand Up @@ -129,7 +129,7 @@ alert.dismiss()

{{< tabpane langEqualsHeader=true >}}
{{< tab header="Java" text=true >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L87" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L88" >}}
{{< /tab >}}

{{< tab header="Python" text=true >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ alertas.

{{< tabpane langEqualsHeader=true >}}
{{< tab header="Java" text=true >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L56" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L57" >}}
{{< /tab >}}
{{< tab header="Python" text=true >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_alerts.py#L12-L18" >}}
Expand Down Expand Up @@ -63,7 +63,7 @@ Este exemplo também mostra uma abordagem diferente para armazenar um alerta:

{{< tabpane langEqualsHeader=true >}}
{{< tab header="Java" text=true >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L71" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L72" >}}
{{< /tab >}}

{{< tab header="Python" text=true >}}
Expand Down Expand Up @@ -122,7 +122,7 @@ Veja um exemplo de prompt </a>.

{{< tabpane langEqualsHeader=true >}}
{{< tab header="Java" text=true >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L87" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L88" >}}
{{< /tab >}}

{{< tab header="Python" text=true >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ WebDriver可以从弹窗获取文本并接受或关闭这些警告.

{{< tabpane langEqualsHeader=true >}}
{{< tab header="Java" text=true >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L56" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L57" >}}
{{< /tab >}}

{{< tab header="Python" text=true >}}
Expand Down Expand Up @@ -68,7 +68,7 @@ alert.accept()

{{< tabpane langEqualsHeader=true >}}
{{< tab header="Java" text=true >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L71" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L72" >}}
{{< /tab >}}

{{< tab header="Python" text=true >}}
Expand Down Expand Up @@ -124,7 +124,7 @@ alert.dismiss()

{{< tabpane langEqualsHeader=true >}}
{{< tab header="Java" text=true >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L87" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L88" >}}
{{< /tab >}}

{{< tab header="Python" text=true >}}
Expand Down

0 comments on commit 4567a5a

Please sign in to comment.