Description
What happened?
This page that describes implicit waits includes code examples for Java, Python, CSharp, Ruby, and JavaScript. The JavaScript example both: (1) sets the value for the implicit wait and (2) demonstrates the benefit of setting a value for the implicit wait by finding an element that is not immediately available on the page. The examples for the other languages do (1) but not (2). So, there is a tiny inconsistency across the examples for the different languages. And that is the whole bug that this issue reports.
Below I paste four screenshots to show the examples for JavaScript, CSharp, Python, and Java. The screenshots differ on which tab I chose for language for the code example.
Suppose that this bug is worth doing anything about. Then, if we want the examples to be consistent across each of the languages, options include:
- remove (2) from the JavaScript example
- add (2) to the other examples
Option "remove (2) from the JavaScript example"
I claim: the source for that page is waits.en.md, and to remove (2) from the JavaScript example we could change
{{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/waits/waits.spec.js#L37-L41" >}} {{< /tab >}}
to
{{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/waits/waits.spec.js#L37" >}} {{< /tab >}}
i.e. change L37-L41
to L37
.
Option "add (2) to the other examples"
On waits.en.md, change the gh-codeblock path
s for the other languages to include an interval of lines that extends to the line that finds element with id "box0"
. For example, change
{{< tab header="Java" >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/waits/WaitsTest.java#L50" >}} {{< /tab >}}
to
{{< tab header="Java" >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/waits/WaitsTest.java#L50-L54" >}} {{< /tab >}}
i.e. change L50
to L50-L54
. And perform a similar edit for Python, CSharp, and Ruby.
Best wishes,
Andrew
What browsers and operating systems are you seeing the problem on?
Browser: Brave v1.64.109
OS: macOS Big Sur v11.7.10