Web page Audit process to find specific Text/Image with few conditions

Hi Team,

There are few scenario that need to automate:-
1:-First I need to pass WebUrl (any random Url),then in that url I ,need to find “Menu” ex:-where list of different type of item are available. ex:-restaurant/hotel web url.
1.1:-If “Menu” not find, Then message should displayed “No Pizza” in
message box .
2:-If “Menu” text find, then loop will enter inside & start finding “Pizza”
text/image, Then it should Count different type of Pizza are displayed in
that Webpage.(There are 3-condition in it) 3-Message need to displayed
according to condition.
2.1:-(A)-Select Primarily pizza if:
->They sell 5+ different pizza items on the menu
->This is the main entree that a restaurant sells (may include pasta,
salads, calzones, etc.)
->Often this will be the first thing on their menu (not counting
Starters/Appetizers)

       (B)-Select Some pizza if: 
        ->They sell 1-5 different pizza items on the menu 
        ->The restaurant does sell pizza, but also has other entrees on the 
            menu (pizza is included on the menu but many guests might order 
           something different)
        ->Often this will not be the first thing on their menu (not counting 
         Starters/Appetizers)
         
         (C)-Select No pizza if:
        ->There is no pizza on the menu

Note:- ->I need to find out “Menu” in the Web URL(any random Web
Url), whether it is a hotel/finance URL etc…
->if “Menu” text find then loop will go inside & perform above 3-pizza
conditions.
->if “Menu” not find then it should displayed message like “No Pizza”
Script build should be like that it will accept any random Web URL &
process according to above condition

There are 1-million Restaurants web url are officially are there. those are need to automate.

Need help on this.
Expecting “Xml” format logic build

Hi Team,
Any one have any thought on this scenario , pls help me out.

Thanks,

Hello, have you considered using c# to create API Calls to get the full html of that website and from there search for the Menu in the text using string manipulations or regex. Once you find the text or find the url to go to that section and get what you need.

Hi Erigert,
Thanks for your response,
I need to write C# code in Invoke code activity for API calls for any random website. then proceed with other steps. pls correct me if am wrong.

Basically yes, let me give you an overview that your process can work.

  1. Create a C# script that does a get request to the website endpoint and returns full HTML of the website.
  2. Once you have the html try to find any button menu, any link to the menu, or the menu text if it present in the first page. ( spearate in three options)
  3. Once you have you match navigate to that url , or that button using UiPath and open the menu. In order to get the menu items you can still use C# to do a get request to get the full items of it but since the structure may change and here you can use AI. Like get the full menu text and send it to AI asking to list only pizzas from this menu.

This is basically an idea and needs to be tested to see how it will work in different websites but you can achieve a good score with it.