Skip to content

Conversation

DNotNice
Copy link

@DNotNice DNotNice commented Oct 8, 2025

User description

Added Kotlin Waits Code Example

Description

Added Kotlin examples for Selenium waits in the code section. Previously, Kotlin examples were missing, making it harder for Kotlin developers to reference wait implementations directly from the documentation.

Motivation and Context

Providing Kotlin wait examples ensures that Kotlin developers can quickly find and reference proper Selenium wait usage, improving accessibility and completeness of the documentation.

Types of changes

  • Change to the site (I have double-checked the Netlify deployment, and my changes look good)

Checklist

  • I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works.

PR Type

Enhancement


PR Type

Documentation, Enhancement


Description

  • Added comprehensive Kotlin code examples for Selenium waits

  • Created test file with implicit, explicit, and fluent wait implementations

  • Updated documentation to reference Kotlin examples across multiple languages

  • Replaced placeholder badges with actual code block references


Diagram Walkthrough

flowchart LR
  A["New Kotlin Test File"] --> B["Implicit Wait Example"]
  A --> C["Explicit Wait Example"] 
  A --> D["Fluent Wait Example"]
  E["Documentation Files"] --> F["Updated Code References"]
  B --> F
  C --> F
  D --> F
Loading

File Walkthrough

Relevant files
Tests
WaitsTest.kt
New Kotlin waits test implementation                                         

examples/kotlin/src/test/kotlin/dev/selenium/waits/WaitsTest.kt

  • Created new Kotlin test class extending BaseTest
  • Implemented three wait test methods: implicit, explicit, and fluent
  • Added proper imports for Selenium WebDriver and wait classes
  • Included assertions to verify wait functionality
+65/-0   
Documentation
waits.en.md
Updated English documentation with Kotlin examples             

website_and_docs/content/documentation/webdriver/waits.en.md

  • Replaced {{< badge-code >}} placeholders with actual Kotlin code
    references
  • Added links to specific lines in the new Kotlin test file
  • Updated three sections: implicit waits, explicit waits, and fluent
    waits
+3/-3     
waits.ja.md
Updated Japanese documentation with Kotlin examples           

website_and_docs/content/documentation/webdriver/waits.ja.md

  • Replaced {{< badge-code >}} placeholders with Kotlin code block
    references
  • Added same code references as English version for consistency
  • Updated Japanese documentation to include Kotlin examples
+3/-3     
waits.pt-br.md
Updated Portuguese documentation with Kotlin examples       

website_and_docs/content/documentation/webdriver/waits.pt-br.md

  • Replaced placeholder badges with actual Kotlin code references
  • Added links to specific test methods and line ranges
  • Updated Portuguese-Brazilian documentation with Kotlin examples
+3/-3     
waits.zh-cn.md
Updated Chinese documentation with Kotlin examples             

website_and_docs/content/documentation/webdriver/waits.zh-cn.md

  • Replaced {{< badge-code >}} with proper code block references
  • Added same Kotlin example links as other language versions
  • Updated Chinese documentation to include Kotlin code examples
+3/-3     

Copy link

netlify bot commented Oct 8, 2025

👷 Deploy request for selenium-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 9888241

@CLAassistant
Copy link

CLAassistant commented Oct 8, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

qodo-merge-pro bot commented Oct 8, 2025

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
No custom compliance provided

Follow the guide to enable custom compliance check.

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

Copy link
Contributor

qodo-merge-pro bot commented Oct 8, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Avoid performing actions inside waits

Separate the wait condition from the action by first waiting for the element to
be displayed with wait.until { revealed.isDisplayed } and then performing the
sendKeys action outside the wait block.

examples/kotlin/src/test/kotlin/dev/selenium/waits/WaitsTest.kt [57-60]

-wait.until {
-    revealed.sendKeys("Displayed")
-    true
-}
+wait.until { revealed.isDisplayed }
+revealed.sendKeys("Displayed")
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies an anti-pattern where an action is performed inside a wait condition, which is not a recommended practice and can lead to flaky tests.

Medium
  • More

@pallavigitwork
Copy link
Member

PR looks fine to me. can be further reviewed for acceptance by TLC members.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants