Using only JavaScript, without the use of JQuery etc, How do I find the corresponding data attribute given an Id ?
Example
<div id="id-test" data-qa="data-qa-test">
</div>
Input: "id-test"
Output: "data-qa-test"
Is there a way in Javascript to take the code below, and find the corresponding data-qa automation tag locators?
Related question:
Javascript: Select all data-qa attributes on HTML Page
Background: Trying to replace Selenium ID locators, with our data qa attributes.