Skip to content

feat: support more PW API for Get Text#4904

Merged
aaltat merged 1 commit into
MarketSquare:mainfrom
aaltat:get_text_type
May 15, 2026
Merged

feat: support more PW API for Get Text#4904
aaltat merged 1 commit into
MarketSquare:mainfrom
aaltat:get_text_type

Conversation

@aaltat
Copy link
Copy Markdown
Member

@aaltat aaltat commented May 15, 2026

Support allInnerTexts, allTextContents, innerText, inputValue, innerHTML and the old functionality

Fixes: #4763

Copilot AI review requested due to automatic review settings May 15, 2026 22:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the existing Get Text keyword to expose additional Playwright text-retrieval APIs (allInnerTexts, allTextContents, innerText, inputValue, innerHTML) via a new text_type argument, while preserving the original behavior when no text_type is specified. The gRPC contract is updated so GetText returns a ListString (with log) and accepts a new ElementSelectorWithTextType request. Tests are reorganized and expanded, and a <select id="pet-select"> is added to the dynamic test app to exercise the new types. A separate cleanup also renames the highlight sentinel ROBOT_FRAMEWORK_BROWSER_NO_ELEMENT to a shared ROBOT_FRAMEWORK_BROWSER_NO_SET constant.

Changes:

  • Add TextType enum and text_type option to Get Text, returning a list for all* types and a string otherwise.
  • Update proto, Node getText server, and helpers to use ListString response and dispatch by text type.
  • Reorganize acceptance tests, add new basic_getters_get_text.robot, and add a <select> to the test app.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
protobuf/playwright.proto New ElementSelectorWithTextType, ListString.log, and updated GetText signature.
node/playwright-wrapper/response-util.ts Adds listStringResponse helper.
node/playwright-wrapper/getters.ts Implements TextType dispatch in getText with per-type Playwright calls.
node/playwright-wrapper/interaction.ts Switches waitForAlerts to listStringResponse.
node/playwright-wrapper/evaluation.ts Renames highlight sentinel to ROBOT_FRAMEWORK_BROWSER_NO_SET.
node/playwright-wrapper/tests/getters.test.ts Adds unit tests for new getText paths.
node/playwright-wrapper/tests/evaluation.test.ts Updates highlight sentinel test.
node/dynamic-test-app/src/login.tsx Adds <select id="pet-select"> element.
Browser/utils/data_types.py Adds TextType enum and ROBOT_FRAMEWORK_BROWSER_NO_SET constant.
Browser/utils/init.py Exports TextType and the new constant.
Browser/keywords/getters.py Updates Get Text keyword to send text_type and handle list/string returns.
Browser/keywords/evaluation.py Uses new shared sentinel constant.
Browser/gen_stub.py Imports TextType in generated stub header.
atest/test/02_Content_Keywords/text_keywords.robot Removes Text Area Access (moved).
atest/test/02_Content_Keywords/basic_getters.robot Moves Get Text tests out, renames setup, updates label count to 14.
atest/test/02_Content_Keywords/basic_getters_get_text.robot New suite covering all text_type variants.

Comment thread Browser/keywords/getters.py Outdated
Comment thread Browser/utils/data_types.py Outdated
Comment thread Browser/keywords/getters.py Outdated
Comment thread node/playwright-wrapper/getters.ts
Comment thread node/playwright-wrapper/getters.ts
Comment thread atest/test/02_Content_Keywords/basic_getters_get_text.robot Outdated
Support allInnerTexts, allTextContents, innerText, inputValue, innerHTML and the old functionality

Fixes: MarketSquare#4763
Copilot AI review requested due to automatic review settings May 15, 2026 23:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Comment thread node/playwright-wrapper/getters.ts
@aaltat aaltat merged commit 6b5fe6b into MarketSquare:main May 15, 2026
27 checks passed
@aaltat aaltat deleted the get_text_type branch May 15, 2026 23:35
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.

Implement keyword for allTextContents

2 participants