AI123 Posted September 5, 2019 Share Posted September 5, 2019 (edited) I want to change the value of a label: ... ; XPath: //*[@id="primary_color_tshirt"]/div/a/label $sButton_T_SHIRT_COLOR = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@id='primary_color_tshirt']/div/a/label") _WD_ElementAction($sSession,$sButton_T_SHIRT_COLOR,'value', 'Yellow') ... But I get this error messages: ... $sData={"id":"26fb8bb5-bbef-4a3a-a553-bc3c99186211", "text":"Red"} ... _WD_ElementAction: {"value":{"error":"element not interactable","message":"element not interactable\n (Session info: c... _WD_ElementAction ==> Webdriver Exception: {"value":{"error":"element not interactable","message":"element not interactable\n I think this could be the problem: a) A label can't be changed at all with AutoIt. b) The platform protects the label from being changed. c) The path is wrong (what I don't think because the label is found ($sData={"id":"26fb8bb5...) So does anybody know a way to change the label or isn't it possible? Edited September 5, 2019 by AI123 Link to comment Share on other sites More sharing options...
Danp2 Posted September 5, 2019 Share Posted September 5, 2019 From the standards doc -- So, you can't change a label's text using _WD_ElementAction. While I haven't tried it, I think this should be possible using _WD_ExecuteScript to make the change using Javascript. AI123 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
AI123 Posted September 6, 2019 Author Share Posted September 6, 2019 1 hour ago, Danp2 said: From the standards doc -- So, you can't change a label's text using _WD_ElementAction. While I haven't tried it, I think this should be possible using _WD_ExecuteScript to make the change using Javascript. Ok, thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now