I am new to selenium. following are some info. Can someone guide me to create xpath and this is the approach we are using to maintain the UI elements unique, so for this code, will selenium help to automated the fields.
All general components and containers having a custom attribute called data-component. So their parent element will contain - ...data-component = "text-input"
or ...data-component="wc-card"
My code will look like this
<div data-component="wc-dialog">
<div data-component="text-input" name="wcName"></div>
<div data-component="text-input" name="wcCode"></div>
<div data-component="text-input" name="wcDescription"></div>
<div data-component="button-input" name="add-wc"></div>
</div>
//div[@name="wcName"]/input
would find the input web element inside the wcName division.