The situation is that admin sets the Specified fields for the front end user and it is upon admin to decide how many fields he’ll set for the user. One thing is that he can only create 2 types of fields; either Text or Dropdown.
Also, the user can make that field mandatory. Now the question is how can I automate that using selenium and java. I have to check that either these fields are present or not and if present then which type of it and then I have to check that either it is necessary or nor.
Here I am attaching an image from DOM. I think that here Divs has been used.
Also, one thing possible is there is an option that Specified Meetings fields may be not present. So I have to first check that either these fields are present or not. So the scenario will be like this:
Meeting Specifics fields are present or not
The field is of type text or Dropdown
The field is necessary or not
Either the next field exists or not.
Source: Read More