If I want to get data from an element it's currently not possible to do so, except innerText and Value. I'd like to see this extend to include all data attributes. Especially the "dataset" (data-) attribute is useful. A json string would be ideal.
Let me know if you want me to give you some JS heads up on how to compile such a string
Get all attributes of an element (ChromeGetElementData>)
Moderators: Dorian (MJT support), JRL
- Grovkillen
- Automation Wizard
- Posts: 1132
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Get all attributes of an element (ChromeGetElementData>)
You can specify any attribute name:
https://www.mjtnet.com/manuals/v15/HTML ... tdata.html
https://www.mjtnet.com/manuals/v15/HTML ... tdata.html
item_type can be one of:
text - the inner text of the element
value - the value of the element if it has one (e.g. for inputs)
attribute/attribute_name - where attribute_name is a valid html attribute
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Grovkillen
- Automation Wizard
- Posts: 1132
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Get all attributes of an element (ChromeGetElementData>)
Oh!! Missed that! Thanks for pointing it out.