question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add ids to form related components ( date input fields, radio buttons and checkboxes, dropdowns, etc)

See original GitHub issue

What problem does this feature solve?

It makes it easy to do end-to-end testing using Selinium and xPath

What does the proposed API look like?

For example a code like this:

<DatePicker id='datepicker' /> should give in the compiled code something like this:

...
<div class="ant-calendar-date-input-wrap">
       <input class="ant-calendar-input " value="" placeholder="Select date"  id="datepicker">
</div>
...

Thank you very much for the great job you are doing!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

9reactions
JeffreyATWcommented, Dec 14, 2017

Adding an id to input fields (even inside components like DatePicker) is important for accessibility reasons. I want to add an htmlFor to associated labels, and focus the input fields when I click the labels.

1reaction
ttgiangcommented, Jan 18, 2020

I’m using uilicious.com for my UI testing and it’s very challenging when IDs are not present.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML Form using input type text, password, Radio, Checkbox ...
An HTML form can have input elements, checkbox, radio buttons, ... To select city, country, date, month, year etc, Select Dropdown is used....
Read more >
HTML 5.2: 4.10. Forms - W3C
A form is a component of a Web page that has form controls, such as text fields, buttons, checkboxes, range controls, or color...
Read more >
Adding Radio Buttons, Checkboxes & Lists for User Input to ...
Discover the characteristics and functions of radio buttons, checkboxes, and dropdown lists and learn how to add them to HTML forms.
Read more >
<input type="radio"> - HTML: HyperText Markup Language
<input> elements of type radio are generally used in radio groups—collections of radio buttons describing a set of related options.
Read more >
CSS Introduction | Laserfiche Forms | Customizations
.label, Every field label ; select, The input area for a drop-down list. ;.otherchoice, All "Other" choices for checkbox and radio button fields....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found