Many times we have a situation when we have to test the value of a web-element is a number or not. If the web-element stores the value in integer format then we can easily check that whether the desired element is number or not but suppose if we have a string that contains some integer value and we have to assert that value that whether it's a number or not then we will have to face the issue on asserting the string with Integer will return false and our testcase will fail.
If we print the text of above web-element then the output will be "4 Employees". Now we have to test that some count of employees should be present. In first look, the solution is that we first split the string with space and then check that whether the first index element is Integer or not. Since the first index element is a number but it is stored in String form, so this will not fulfill our requirement. The other face of this problem is that first converting the zero index value to an integer and checking that the value is an integer or not is also of no use.