Text Exists in web table

Hi Experts

Is it possible to use the Text Exists activity on a web table combined with some sort of Trim function?

The table has a header named “Subject” and is populated with the file name when a file is uploaded. I need to verify the file is uploaded and the most recent file will always be in row 2. Therefore I am using the following selector:

<html title='myApplication' />
<webctrl id='*File*Journal*' tag='TABLE' />
<webctrl tag='TD' colName='Subject' tableRow='2' />

The issue is that the text in the table cell contains a whitespace or similar. So when I look for text “Filename” the activity will always return FALSE. I tried adding Filename + “*” but that still returns FALSE.

Any ideas for getting this to work?

Use element exists activity and wherever you think there can be space or any other characters, mark them by *


Thanks - I didn’t think of that but it solved my problem.

@Madhavi, can we also use the String.Contains(text)?

Using String.Contains will be a long approach as to check this, you need to retrieve the string first.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.