How to change the dropdown menu value dynamically

Hi All,

i have a situation like i need to change the page number of a datatable dynamically. below is the image of datatable pagination.
image.

what i have done is Scrapped the data table using data scrapping, then selected value 1 by using select item activity from the dropdown menu and does some operation.

what i want is, after doing operation for the first page it should select 2nd page and do same operation and so on for the rest of the page.

How to achieve it, kindly help.

Thanks in advance

Hey @Rakesh_Tiwari

You can use a variable in the select item activity and keep increasing the value by 1 after data scrapping process.

Regards,
Nilay Varshney

Hi,
Please let me know the logic how to increase the value of item, i am attaching the screenshot of select activity.

i tried creating variable as below


And passed that variable in select item activity like this
image
and then incremented the value by 1 like this
image
but got error
image
how to resolve this?

image
Kindly try with all the properties mentioned in the screenshot and let me know if it works.
Regards,
Nilay Varshney

Hi,
yes, it worked for 1stpage but didn’t selected the 2nd page.

one doubt the assign activity i should use right after the select item activity or i should place it at last of the sequence?

1)You have to use the assign activity under the loop body.
2)Make sure the scope is set properly otherwise the value of counter variable will always reset and have the value assigned in default (i.e.) 1

scope i have set is correct.

kindly check me sequence and let me know if it required any changes.

image

because what is happening is, it just scrap the data and just click on pages like page, page 2, page 3… likewise

@Rakesh_Tiwari
Hi , during data scraping we get the pop up message whether to scrap next page also or not.
why are you not using this . you have to select next page link only

kept select item activity outside the loop and assign activity inside the for each loop, but not selecting the 2nd page.

I Can see there is a next symbol beside the drop down which can be used in data scrapping option spanning in multiple pages.

Hi @TUSHAR_DIWASE,

i have done the same but it is not working automatically, may be because of the application or whatever may be the reason. but not able to achieve that.

yes, i scrapped the data like that only, so what is happening is it scrap the data of 1st page and then change to 2nd page and scrap the data and so on, but what i want is it should come back to page 1 to do some operations and then change to page2 and so on.

but for this case not working.

please check my selector for next page link.
image

If the application requires selecting the page and doing any further actions to move to next page then you must do that.

Ex) select page 2 by select items then press enter to navigate to page 2 like that

ok, so you mean to say every time i need to use select item activity?

one question, can we make the nextlinkselector dynamic? so that it should select the pages automatically, if yes then how.

below is the selector of nextlink

Class,tag,title could be the reliable one.

suppose i am taking title, so i need to change with wildcard?

That depends.
If the title is same for all pages then no need.
Try to select the attributes that are constant upon page changing.