Search string in webpage

web-automation
variables
text-actions

#1

How can I search for a string which is there in the variable on the webpage and findout whether it exists on the webpage or not? Please help.


#2

Keyboard Event - Ctrl+F
Capture Text-box and type text that u want to search


#3

Thank you for your response , I am doing the same but the image is not getting recognized .

For eg: I have searched for “text”(using ctrl+f in chromiumPortable) and in browser it didn’t find and I have captured the image part which shows 0 of 0 on the search/find(ctrl+f) panel, but the tool not recognizing the image. I wanted to perform if text found(0 of 0) then I will perform if it(0 of 0) not found I am catching it using error handling(believe if not found tool has to raise error), but error is never thrown even though some text is found.

Hope I am clear. Please let me know if its not.


#4

You can do the folliwing:

  1. click CTRL + A
  2. Copy clipboard content to a String variable
  3. Use any of the Text action in recorder on this String variable (Contains, Substring, etc.)

Alternatively, you can use the Web Element action to get the text of a web element - https://kb.workfusion.com/display/RPAe/Web#Web-WebElement


#5

Hi Azinchuk,

This workaround looks solves my problem. Getting xpath quiet needs to have text box e.t.c. But mine is plain text on the browser where I am choosing first option.Thank you.

Can you please let us know why my error handling is not working when an image not found on the screen I am expecting the control has to start executing the catch block which in my case not happening…Any ideas please?

regards,
Bharath


#6

Using String contains solves the problem but the string which should be searched has to be hardcoded . Would there be any way that I can get it from variable since I will be having dynamic values to search for.Thanks in advance.


#7

@bharathkumar_po - we are working on a feature to make all action setting dynamic (add variables usage and variables + constant values)


#8

Ok thank you. Any estimated date dealing with all variables or any releases with these in near future please?


#9

Going back to my issue…Any other work around to search the string since I would deal with dynamic strings , any other way I can do that please?