Skip to content

Add tested JavaScript examples for frames - #3020

Open
TOMASEZARATE wants to merge 3 commits into
SeleniumHQ:trunkfrom
TOMASEZARATE:examples-frames
Open

TOMASEZARATE wants to merge 3 commits into
SeleniumHQ:trunkfrom
TOMASEZARATE:examples-frames

Conversation

@TOMASEZARATE

@TOMASEZARATE TOMASEZARATE commented Nov 26, 2026 •

Copy link
Copy Markdown

Thanks for contributing to the Selenium site and documentation!
A PR well described will help maintainers to review and merge it quickly

Description

Part of #2890

The frames page already pulled its Java, Python, C# and Ruby examples from tests, but JavaScript still had inline snippets against a sample #modal / buttonframe iframe. This adds examples/javascript/test/interactions/frames.spec.js, which runs against iframes.html and covers switching by element, by id, by name and by index, plus going back to the default content. The page now uses gh-codeblock for the JavaScript tabs in en, ja, pt-br and zh-cn.

The "This won't work" block stays inline in every language, since it illustrates the static HTML above it and there's no test page for it.

Kotlin was split out into #3025 so each language has its own PR.

Motivation and Context

Inline snippets can drift from the API, so #2890 moves examples into tested code.

Types of changes

  • Change to the site (I have double-checked the Netlify deployment, and my changes look good)
  • Code example added (and I also added the example to all translated languages)
  • Improved translation
  • Added new translation (and I also added a notice to each document missing translation)

Checklist

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

I used an AI assistant (Cursor Agent with Grok 4.7) while writing this change. I reviewed the code myself, and the commit has an Assisted-by trailer.

Assisted-by: Cursor Agent with Grok 4.7
@netlify

netlify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

👷 Deploy request for selenium-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit f5d3696

@CLAassistant

CLAassistant commented Nov 26, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@rpallavisharma

Copy link
Copy Markdown
Member

@TOMASEZARATE please use seperate PRs for each language submission.

Assisted-by: Cursor Agent with Grok 4.7
@TOMASEZARATE

Copy link
Copy Markdown
Author

Thanks @rpallavisharma , makes sense! I moved the Kotlin examples out of this PR, so it now only has the JavaScript ones. Kotlin is in #3025.

@TOMASEZARATE TOMASEZARATE changed the title Add tested JavaScript and Kotlin examples for frames Add tested JavaScript examples for frames Nov 28, 2026
@rpallavisharma

Copy link
Copy Markdown
Member

@SeleniumHQ/selenium-tlc please see for merge.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants