I have started using uipath for the past two days. I am reading from an excel sheet and loading to a web page and progress has been good.
I am stuck on the following scenario. I have a bs-datepicker that is used to enter dates. I have been able to get the date from the data in the sheet, separate the day,month & year parts. I have automated the selection of the month and year I have no issues.
The day is where the issue is. The control looks like the below,
On using the inspect tool on chrome, i see this for the 29th of May,
<td role="gridcell" class="ng-star-inserted" style=""><span bsdatepickerdaydecorator="" class="">29</span></td>
I see the following for 29th of April,
<td role="gridcell" class="ng-star-inserted"><span bsdatepickerdaydecorator="" class="is-other-month">29</span></td>
As you can see one difference between the two is that the span class is an empty string for 29th May which i am guessing is the error when i am getting when attempting to indicate on screen 29th of May,
In fact i get that same error when trying to indicate all elements for the active month, which is May in this case but no errors when indicating for the last month which is April.
Any tips on how i can get around this ?
Thank you
Thank you everyone for your answers. What i ended up doing is using a try catch with a selector not found exception.
So the following will fall in the try,
<html app='chrome.exe' title='Add Employee | *' />
<webctrl aaname='{{FromDay}}' tag='SPAN' class='' parentclass='ng-star-inserted' />
And in the Catch,
<html app='chrome.exe' title='Add Employee | *' />
<webctrl aaname='{{FromDay}}' tag='SPAN' />