How to search for a keyword in google result page

uiautomation

#1

Hi,
I have a keyword called PanCake or other food item names. Now if I type in google search bar it will redirect me with google results page… I have to check whether the result page contains dessert keyword or not so that I will come to know the food item is dessert or not… If anyone knows plz help me


#2

Hi,

Here we go.
PanCake.xaml (8.9 KB)


#3

Tq ddpadil
But it is not woking, when I replace Pancake with Gulab Jamun still it is showing its not a Dessert… i have to read google search results and find whether the results contains dessert or not


#4

Hi @Sunitha_Bist, Can you please define the rule, based on which the robot has to work and pick the information from the target element and it should check whether its Desert or anything else.
If you are working with Google engine in search results you will get so many results. How you are going to define the rule to check multiple Search Result Links?


#5

Im having an excel sheet where I have food items list, and Im using for each row to and just placing food item name inside the google search bar… Now the google will result with search result page, In that page I have to check whether the page contains dessert keyword or not


#6

I tried using gulam jamun its showing me it is "Dessert.
May be your net is slow.
Keep more delay and try. Because scraper would have scraped the result and its looking for the word dessert so its returning not dessert :smiley:


#7

Actually problem is with searchResult, I am getting searchResult as: (function(){var c4=1188;var c5=1276;try{var w=document.body.offsetWidth,n=3;if(w>=c4)n=w<c5?4:5;document.getElementById(‘rhs_block’).className+=’ rhstc’+n;}catch(e){}
})();

thats why it cant able to match it with dessert

ddpadil, Can you tag your searchResult Output


#8

it is not working… try with - Huevos Platos Lunch… this solution is not available for attaching live element


#9

check this.:wink: Its working.


#10

can you please share me the selector code for extracting text


#11
<html app='chrome.exe' title='* - Google Search' />
<webctrl id='rhscol' tag='DIV' />

#12

please try to run in a loop… means take 3 items and run…


#13

Here we go.
PanCake.xaml (12.0 KB)


#14

this is the output i got

ans are its not a dessert for 3 items


#15

Its working fine for me.
first two its showing dessert
3rd item showing not dessert.

increase delay after search. Its scraping before even search result(slow net).Hence its giving not dessert for all.
This is my output(added writeline again).


#16

I kept 1 min delay still not working but when I use attach live element then it is working but restoring old scraped data to other two items


#17

You shouldn’t use attach live element .It only works for that instant.
Don’t know why its not working for you. :frowning:
Its running fluently.
Can you attach your workflow.


#18

Yet not i didnt created any workflow coz i thought to run your workflow first… but tq so much fa helping me… i ll keep trying it


#19

i have some keywords in my excel sheet, only one column, i want to search all the keywords one by one in google. i tried using for each but it stopped by searching only the first keyword. @ddpadil


#20

Hi @ArafatRakib1,
Refer this

Regards
Balamurugan