Skip to content

Fix Expect Element rejecting WebElement locators (#482) - #483

Open
chsinger wants to merge 1 commit into
serhatbolsu:masterfrom
imbus:fix/issue-482-expect-element-webelement
Open

chsinger wants to merge 1 commit into
serhatbolsu:masterfrom
imbus:fix/issue-482-expect-element-webelement

Conversation

@chsinger

Copy link
Copy Markdown
Contributor

The locator: str type hint made Robot Framework auto-convert any argument to a string via its type-based argument conversion, so a WebElement (e.g. from Get Webelements) got stringified before reaching _element_find, which then failed to parse it as a locator string. Dropping the annotation matches the untyped locator params used by element_should_be_visible/enabled/disabled, which already accept WebElement instances.

Fixing

#482

The `locator: str` type hint made Robot Framework auto-convert any
argument to a string via its type-based argument conversion, so a
WebElement (e.g. from Get Webelements) got stringified before reaching
_element_find, which then failed to parse it as a locator string.
Dropping the annotation matches the untyped locator params used by
element_should_be_visible/enabled/disabled, which already accept
WebElement instances.
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.

1 participant