Edited Question

Hello everyone!
I have an array with multiple keywords. I need to perform data scraping from a website for each of the keyword. The selector I get from the data scraping is this-flipkarterror

Shampoo has to be replaced by a variable that contains the keyword. I tried using * wildcard in the place of shampoo but it hasn’t worked. What is the syntax to pass a variable in title?

@tara017

I can’t see selector in your post. You have pass variable to selector like this:

 <Attribute name = ' "+variableName.toString+" '>

I’ve posted a screenshot. Please take a look.

Hi @tara017

Buddy instead of title with value as the selector has now,

  1. first use a for each loop to iterate through the array
  2. assign a variable to hold each and every value of array with variable name out_array_value of type string
  3. place that variable here in title like
    title = ’ " + out_array_value + " * ’

out_array_value - has other values of shampoo
** can take any string next to it

Hope this would help you
cheer

Paste the selector in assign statement and replace shampoo with the expression explained in the above post.

And pass the variable in selector of your activity

I assigned it to a variable ‘b’ for trial & added it to the selector but this is how it turned out
flipkarterror

@tara017
No Worries buddy you are doing good…try to execute that…

" will get converted to quot automatically with vb thats not a issue

But for variable b, assign with .trim at the end of its value to avoid unwanted space and better replace the other strings next to with *
like this
title=’ " + b + " * ’

To understand this just type title=’ " + b + " * ’ in your reply message to me in left side and see the right side the string getting converted

Cheers.

I did it. But when its executing, the data scraping is showing the results of the first keyword for all other keywords. For example- my array has {“shampoo”,“conditioner”,“hair oil”}. When I run it in the for loop…It throws out the same scraping results of shampoo for conditioner & hair oil as well.

Use a for each loop to iterate through this array
and assign the value to b as
b = item.ToString.Trim

If you dont mind can i have view of ur xaml, if possible

Cheers

Practice.xaml (15.1 KB)

This is the sample workflow without making the changes you have mentioned. I’m trying to do data scraping of all the words in the array & extract first 25 results to an excel. It’s supposed to be pretty straightforward but I’m not able to figure it out.

Buddy, i think i m unable to open the xaml in my studio, can i have the whole folder a zipped one if possible, Sorry for the inconvenience…
Its easy buddy we can solve this out
@tara017

Cheers

1 Like

f1 f2 f3 f4 f5

I’ve shared snippets of my workflow. The idea is pretty simple- Open browser–Navigate to flipkart–in for loop, get keywords from array–enter it in search bar–extract 25 names of the products–write to excel. Thank you so much for trying to help. I appreciate it!

1 Like

Hi buddy @tara017,

Its solved buddy, kindly have a look at this xaml file

Flipkrt.xaml (13.3 KB)

Hope it would help you

Cheers.

1 Like

THANK YOU! It works! you saved my life. God bless you!!

1 Like

Buddy @tara017
Cheers…keep going…!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.