Text box naming convention

0
Are there any best practices or conventions for naming of the text box elements? Are there any other such rules for names of other elements? I would like to name them textBox_{Label_caption}, for ease of using css class selector in selenium, would this be lege artis/in accordance with best practices?
asked
2 answers
4

Hello Wiktor Wojtyna,

 

There is no such rule for textbox element.

you can use below.

1.Name your text box based upon attribute for FirstName you can put txtFisrtName

2. You can use prefix txt,lbl,btn for Textbox,label,Button UI elements.

3.Try to use Camelcase,avoid genericname likeTextBox1

answered
1

Hi Wiktor,

There no such best practice for Textbox naming convension, but you can define your own, This is important from automation perspective and this values are used while finding xpath for automation.

You can also refer this documentation for best practices; 

https://docs.mendix.com/howto8/general/dev-best-practices/

answered