Our vBulletin migration is complete.
Welcome vBulletin users! All content and user information from the Micro Focus Forums (vBulletin) site has been migrated to this site. READ MORE.
Highlighted
Varinderdeep Absent Member.
Absent Member.
1977 views

.TextExists() is not working with Google Chrome

I am trying to verify text on webpage using TextExists(). It is working fine with IE, but not at all with Chrome. What alternative I can use for it

Exp: .TextExists("Test") will return True if 'Test' is shown on the webpage under IE, but returns False on Chrome

0 Likes
8 Replies
Micro Focus Expert
Micro Focus Expert

RE: .TextExists() is not working with Google Chrome

Hi

Text recognition is not supported for the Chrome browser. Text recognition includes the following methods:

TextCapture
TextClick
TextExists
TextRectangle

This is documented in our help documentation under "Limitations for Testing with Google Chrome"

Regards,
Colin
0 Likes
Varinderdeep Absent Member.
Absent Member.

RE: .TextExists() is not working with Google Chrome

Then what can I use to verify text on Chrome Webpage. Any suggestions please??
0 Likes
Micro Focus Expert
Micro Focus Expert

RE: .TextExists() is not working with Google Chrome

Are you trying to verify a specific valye of Text within a specific control or are you looking to find if a specific word exists on the entire page, regardless of the control?

Regards,
Colin
0 Likes
Micro Focus Expert
Micro Focus Expert

RE: .TextExists() is not working with Google Chrome

Also, which Silk Test Client(Workbench, Silk4J, Silk4Net, Classic) are you using?
0 Likes
Varinderdeep Absent Member.
Absent Member.

RE: .TextExists() is not working with Google Chrome

It is WorkBench. Value is within specific control like textfield
0 Likes
Micro Focus Expert
Micro Focus Expert

RE: .TextExists() is not working with Google Chrome

The simplest way would be to do a verification using Verify() method. For example in a .NET script:

Workbench.Verify("Test", .DomTextField("UsernameField").Text, "Comment here")

This verifies that the expected value equals the actual value and enables you to add a comment.
0 Likes
kk6 Absent Member.
Absent Member.

RE: .TextExists() is not working with Google Chrome

Hi ColinM,

I have doubt here, we need to execute particular steps if text exists or we need to do execute different set of steps in this case if we use Verify method to check text exists or not in our final result file our test would be shown as failed if that particular text is not there right?

so how to avoid that in result file.
0 Likes
Micro Focus Expert
Micro Focus Expert

RE: .TextExists() is not working with Google Chrome

If you want to avoid the test being Passed/Failed using Verify(), you can put the condition within an If statement. See my screenshot below:

 

 

 

I have inserted an If statement which contains the condition which checks if a piece of text matches the text in the control. If this returns True, then it displays a Message Box stating "Text Exists". Else, if not true, it displays message box "Text Does not Exist!". 

You can use this same approach can be applied to a .NET script. 

Regards,
Colin

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.