Find if user facing text exists on webpage if not on screen (long page that would require scrolling)

I have been trying for a while and just cannot figure it out. Is there a way to search if text is user facing on a webpage when it may not be on the screen at the moment (long page with text and what you are searching for is at the end thus not visible by OCR without scrolling an unknown variable number of times)?

At the moment, my work around solution has been to use xtype CTRL+F, enter the text and then do a visual search for an image of what no results found looks like with a 99% match. Downside to that is, it is not as friendly for running on different machines (I changed my Chrome color scheme when I got a new computer which caused things to not hit the 99% threshold but any less and it was not consistently reliable when it did find “2.”.

I tried using SourceSearch but as you can imagine, “2.” can come up fairly often in code but never be in the actual user facing text on the website. At least in all attempts I have made, the OCR is hit or miss on reading 0/0 so that did not seem to work either.

Chrome_NoneFound_dpi_96.png

image

{
  "Command": "XType",
  "Target": "${KEY_CTRL+KEY_F}",
  "Value": "",
  "Description": ""
},
{
  "Command": "XType",
  "Target": "2.",
  "Value": "",
  "Description": ""
},
{
  "Command": "visualSearch",
  "Target": "Chrome_NoneFound_dpi_96.png@0.99",
  "Value": "count",
  "Description": ""
},
{
  "Command": "if",
  "Target": "${count}>0",
  "Value": "",
  "Description": ""
},
{
  "Command": "store",
  "Target": "No GPAs below 3.0",
  "Value": "GLOBALGPA",
  "Description": ""
},
{
  "Command": "else",
  "Target": "",
  "Value": "",
  "Description": ""
},
{
  "Command": "store",
  "Target": "Manually Check",
  "Value": "GLOBALGPA",
  "Description": ""
},
{
  "Command": "end",
  "Target": "",
  "Value": "",
  "Description": ""
},

Hi,

Do you have by chance a URL where I can see that page? Or can you provide a screen shot of the page?

I do suspect your page uses dynamic HTML, means HTML that is composed as those parts become visible by scrolling.

I usually scroll through pages by writing a script that is clicking HTML tags. if the page is a table then it is even easier. Otherwise you have to use know html marks to click on till you get to the end of the page. There you can then get the value looking for. Also I would not use OCR but command that can read the value from the the HTML code. That works as long as the value you are looking for is coming form an image within the web site.

Again, if I have some sample HTML code it would be much more easy to help.

Unfortunately, it cannot be shared due to privacy laws. But if you are familiar with college degree audits, it is trying to double check if there are any GPAs below a 3.0 anywhere on the audit. There can be a variable number of GPAs present depending on the program which makes it fun. I am hoping to avoid anything that looks at the actual HTML code because that is way beyond my realm. I need it to search/count if the text is visually present anywhere on the webpage even if not on the screen at that second similar to how the CTRL+F works. Using this page as an example, I am basically trying to find a way to count the occurrences (or lack thereof) of the word “potato” without getting into the HTML code even if I am at the top of the page and potato might be a few scrolls down or no where at all.

If that made it clear as mud, sorry. August in higher Ed is brain dead time of year so I may not be explaining it the best. Basically looking for something to get the same result as the underlined part of CTRL+F but in a way I can assign it to a variable (O that I could actually select the 0/0 part of the search results lol).

image

I know where you are coming from. HTML is more IT related and you need to have some html knowledge to understand how to target different sections in your web page. But I’m doing only HTML solutions as they are more reliable and have not looked too much into ORC.

Maybe someone else can help you with an OCR approach.