Ctrl + F hotkey save variable and Check if the string is null

I am trying to create a simple flow to check if the site has facebook pixel activated. It is an extension, but I can’t access that part of the browser (also my web recorder keeps blocking when using it), so because the web recorder is not working properly, i created this flow with drag and drop the following way:

  1. open browser
  2. ctrl + u hotkey to open the view page source.
  3. ctr+f to search for the word pixel
    Well…here I have a problem. How do I store the result of the search somewhere?
    I tried to save it in a string and then check if the string is empty (you can see the flow below) and afterwords I write the result in an excel.
    The problem with the flow is that it only executes the first part the else remains untouched no matter what.
    Maybe you can help me…

Thx in advance!!

Hi Alexa,

Welcome to the forums!

For some reason I can’t see the screenshot you’ve attached so I’m not 100% on what you’re trying to achieve.

Have you tried, instead of doing a ctrl-f to find the text you want, using a “Get Text” Activity to scrape the text out of the page source window that you open. Scraping this directly into a string variable, (something like vstrText) you can then perform your search against that directly, something like an if activity with the condition


You can then also perfrom many other string manipulations on it in order to extract whatever you need, such as the position of the word pixel and a substring thereafter. I’d be somewhat careful searching for just the word pixel as it seems like it might be a fairly common term in page sources, you might get some false positives.

1 Like

hi! thx for the reply. for some reason, it doesn`t write in the excel the result…

How are you trying to output to Excel? are you using the excel activities?

To start with, I’d set up a log message on each branch of the if statement to check whether the keyword is being found and that you are at least finding the result you expect. Once that’s confirmed you can then look to output that result in another way. Depending on what you need, if you just want to check that the keyword is there or not, you can use the above, then just use a Write cell activity inside of an excel scope and just specify on that branch of the IF statement to output “Found” or on the other side of the If write “Not Found”

Have you watched any of the training videos yet in the academy? they will give you a good starting point on how to put together simple flows like this and do basic string manipulation and outputting of results

yes, i am using Excel activities. I have tried what you suggested and it doesn’t work as expected. you said smth about the tutorials…is there smth you could recommend for this particular case? thx

Hi Alexa,

UIPath Academy

You need to create a login then you can sign up to do the Learning. I’d suggest starting with the beginners one, its all fairly straight forward and you hsould be able to pick it up in no time :slight_smile:

hi! i have solved it…thx.
i would like to know how to use the google sheets. i try to write the result in a google sheets and i get a kind of error because I don’t know how to complete that.