Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion node/playwright-wrapper/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ enum TextType {
async function _getTextContentNoTextType(locator: Locator): Promise<string[]> {
logger.info(`Getting text content without text type`);
const tag = await locator.evaluate((e) => e.tagName);
// <select> intentionally falls through to innerText() to restore pre-v20 (v19.12.0) behavior per issue #4953.
if (tag === 'TEXTAREA' || tag === 'INPUT') {
logger.info(`Element is ${tag}, get inputValue`);
const inputValue = await locator.inputValue();
Expand Down
7 changes: 0 additions & 7 deletions utest/test_get_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,3 @@ def test_get_text(ctx: MagicMock):
getter._get_text = MagicMock(return_value=Response()) # type: ignore[assignment]
text = getter.get_text("//div")
assert text == "element text"


def test_get_text_select_returns_option_text(ctx: MagicMock):
getter = Getters(ctx)
getter._get_text = MagicMock(return_value=SelectResponse()) # type: ignore[assignment]
text = getter.get_text("id=pet-select")
assert text == "Dog"
Loading