You can try using either the Element Exists or the Get Text option.
point to the data string that is shown when data is empty… Get the string value
Use a IF activity. In the condition, Say like this
StringVariable.Equals("Text That is displayed when empty")
Under the Then section, add what you want to do if there is nothing to process. Under the Else section, add what you want to do if the data is available.
You can use “if activity” to do this check like @Lahiru.Fernando mentioned above. As the scrapped data is a datatable, you can even use the condition, yourdatatable.Rows.Count >0 in the if activity.
If you would like to scrap the next page or next tab, if the datatscrapping is failed, you can make use of a 'Do while" loop with condition yourdatatable.Rows.Count >0.
Inside the loop, use an assign activity in the beginning to clear it’s contents by initializing your_Datatable=new system.Data.DataTable
Scrap the data and use ‘if’ activity to check the condition. If it fails, do actions to navigate to next page or location of next data to be scrapped. Thus the loop continues till you get a scrapped value.
If you use the data scrapping and if activity inside the “Do while” loop , then the the loop iterates till it scrap a non empty datatable, only if you navigate the control to another page to be scrapped when the condition failed in the “if statement”. So please make sure anyone of your datatable will be a non empty data. Otherwise you can use a counter along with that condition. Like ExtractDataTable.Rows.Count < = 0 or counter <5 and increment the counter by one inside the loop. So the loop will terminate after a fixed number of failures.
When I next into the empty page, no data for scrapping. I have used IF Activity to check ExtractDataTable.row.count>0, but it take a long time to check and then run the next step.
How to reduce this time ? I want it check fast, if < 0 will go immediately next step.
In the case you might need to have your flow in flowchart, and use flow decision model. So, if the element exist gives you the positive result, you can continue the flow with the “IF” condition and in “THEN” you have a choice to give exit to flow, if not leave it as it is. and in the negative result of flow condition - your usual process will be followed. hope you are clear now.