You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for contributing to the Selenium site and documentation! A PR well described will help maintainers to review and merge it quickly
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, and help reviewers by making them as simple and short as possible.
Description
added code for frames ruby
Motivation and Context
added code for frames ruby
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)
The code uses the same iframe variable twice when switching to a frame by name. Line 26 should be using the frame name directly rather than reusing the iframe WebElement.
The test performs actions on elements inside iframes but doesn't verify the results of these actions. Consider adding assertions after sending keys to email fields.
The code attempts to find an element by name but doesn't use the result. Instead, it reuses the previously defined iframe variable. You should either store the result of find_element in a variable and use it, or directly use the name in the switch_to.frame method.
# Switch to iframe using name
-driver.find_element(name: 'iframe1-name')-driver.switch_to.frame(iframe)+driver.switch_to.frame('iframe1-name')
Apply this suggestion
Suggestion importance[1-10]: 9
__
Why: The current code finds an element by name but doesn't use it, then incorrectly reuses the previous iframe variable. This is a significant bug that would cause the test to not work as intended when switching frames by name.
High
General
Ensure browser cleanup
The test doesn't handle browser cleanup if an exception occurs during the test. Use an ensure block or RSpec's after hook to guarantee the browser is always closed, even if the test fails.
-# Quit the browser-driver.quit+begin+ # Test code here+ensure+ # Quit the browser+ driver.quit+end
Apply this suggestion
Suggestion importance[1-10]: 7
__
Why: The suggestion improves test reliability by ensuring the browser is always closed, even if an exception occurs during test execution. This prevents resource leaks and orphaned browser processes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Thanks for contributing to the Selenium site and documentation!
A PR well described will help maintainers to review and merge it quickly
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, and help reviewers by making them as simple and short as possible.
Description
added code for frames ruby
Motivation and Context
added code for frames ruby
Types of changes
Checklist
PR Type
Enhancement, Documentation
Description
Added a comprehensive Ruby test for iframe interactions.
Updated Ruby code examples in multiple documentation files.
Improved iframe handling documentation across various languages.
Adjusted Hugo configuration to ignore specific errors.
Changes walkthrough 📝
frames_spec.rb
Add Ruby test for iframe interactionsexamples/ruby/spec/interactions/frames_spec.rb
default content.
frames.en.md
Update English iframe documentation with Ruby test linkswebsite_and_docs/content/documentation/webdriver/interactions/frames.en.md
file.
frames.ja.md
Update Japanese iframe documentation with Ruby test linkswebsite_and_docs/content/documentation/webdriver/interactions/frames.ja.md
file.
frames.pt-br.md
Update Portuguese iframe documentation with Ruby test linkswebsite_and_docs/content/documentation/webdriver/interactions/frames.pt-br.md
file.
structure.
frames.zh-cn.md
Update Chinese iframe documentation with Ruby test linkswebsite_and_docs/content/documentation/webdriver/interactions/frames.zh-cn.md
file.
hugo.toml
Update Hugo configuration to ignore errorswebsite_and_docs/hugo.toml