Sending ctrl+f hot key in web page and finding number of occurrences of word


i want to search mutliple words in webpage using hot key(ctrl+f) and find whether that word exist or not and get the number of occurrences of word…


And what problem did you encounter? It is pretty straightforward to me:

  1. Send Hotkey : Ctrl+F
  2. Type into (the search bar): your string
  3. Get Text where it’s usually written “occurence X of X” or “not found”
  4. Depending on the String you got, you can set a True or False value to a boolean such as wordPresent
  5. If wordPresent is True, extract the number X from the String and put it in an Int32 variable


get text or get ocr text is not working for that pop up(find box).



Get the text by using Get full text activity and store it in a variable stra
Replace Newline with empty value

Use For each activity to loop the words which you have to search
Use below mentioned in for each
Let us take we have to find the number of occurences of strb in stra
then use one assign activity
int a = System.Text.RegularExpressions.Regex.Matches(“stra”,“strb”).Count

This will give the count of occurences.
If count is greater than zero , the word exists else no, and the count is number of occurences

Note: Replace the strb with item.ToString of foreach while looping



for my web page ‘get full text’ is not working . i tried getting the data from web page using OCR but that data is not accurate even after trying with various scale values.