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
In the XML context, an XSL locator with element_name[filter] will search for elements (tags) with the type of element_name not with the attribute @Name=element_name.
e.g. button[string(current())='Cancel'] will select a button labelled 'Cancel'.
Due to the implementation of internal override string Name property of the Winium.Cruciatus.Helpers.XPath.ElementItem, an XPath with the same effect as the one in the example becomes something like Cancel[@ClassType='Button'].
If the label of the looked-for button happens to have multiple words, then the xpath becomes *[@ClassName='Button' and @Name='I agree'], because there's no way something like 'I agree'[@ClassType='Button'] can be interpreted as a correct XSL syntax.
Suggestion: switch from return this.element.Current.Name; to return this.element.Current.ClassName; or return this.element.Current.ControlType.ToString();
(yes, the suggested change may break existing code that rely on this behaviour, a WontFix resultion for this one may be legit)
The text was updated successfully, but these errors were encountered:
In the XML context, an XSL locator with
element_name[filter]
will search for elements (tags) with thetype
ofelement_name
not with the attribute@Name=element_name
.e.g.
button[string(current())='Cancel']
will select a button labelled 'Cancel'.Due to the implementation of
internal override string Name
property of theWinium.Cruciatus.Helpers.XPath.ElementItem
, an XPath with the same effect as the one in the example becomes something likeCancel[@ClassType='Button']
.If the label of the looked-for button happens to have multiple words, then the xpath becomes
*[@ClassName='Button' and @Name='I agree']
, because there's no way something like'I agree'[@ClassType='Button']
can be interpreted as a correct XSL syntax.Suggestion: switch from
return this.element.Current.Name;
toreturn this.element.Current.ClassName;
orreturn this.element.Current.ControlType.ToString();
(yes, the suggested change may break existing code that rely on this behaviour, a WontFix resultion for this one may be legit)
The text was updated successfully, but these errors were encountered: