Assignment 3 - Dynamic Selector in "Element Exists" does not work well

PDD says “Add an Element Exists activity to check if the next page is available. Indicate
a page number and modify the selector to use an attribute related to the page
number (reminder: the in_TransactionNumber argument is the page
number for the Dispatcher).”

This is the dynamic selector. I put in a variable and use as a selector.

For the 2nd, or 3rd turn, it just goes into “NextPageExist = false”.

in_TransactionNumber is increasing from 1, 2, to 3. But just the “element exists” activity has an issue with finding the element.


Please advise.


1 Like

No worries
If possible can I have a view on the selector
We can do one thing rather choosing any page number as element and changing it to dynamic with selectors, we can choose the next page arrow > at last as element and no need to change the selector and make it dynamic as there is no need of it when that is chosen as element
The reason is it will not be available when reached the last page so till then the NectPageExist will let into THEN part where out_TransactionItem will be increments till the last page

Hope this would help you
Cheers @Daun

I mistakenly did not put my selector in my original posting:

As for your words “we can choose the next page arrow > at last as element”,
I do want but the PDD of Assignment 3 says :

@Palaniyappan Thank you!

1 Like

this selector would work either but we need to make sure that when the next page arrow is not there and there would no element to scrape so obvious it will give us exception
so to handle that exception we need to keep this sequence inside a TRY CATCH ACTIVITY where this sequence inside the TRY block and if any exception occurs it will go to CATCH block where we need to assign like this
out_TransactionItem = Nothing
or the way you have mentioned within the if condition but i would suggest to use it inside the catch block
that would work for sure

kindly let know for any queries or clarification buddy.
Cheers @Daun

Can someone help me with the ‘Element exists’ activity which i am using to check for a button present on each page(URL) taken from a list of URLs and likewise show result (found or not found). First URL checked is giving wrong result while subsequent 4 URLs its working as expected.

1 Like

no worries what was the error you were facing

do we have any other queries to be discussed buddy
Cheers @Daun

@Palaniyappan , I am not getting error actually… I am expecting it to return that button is found (as button is present for that URL) but its returning that button is not found.
I am using writeline to print both scenarios.

Please select selector that has tag=‘A’ . Though indicat element … or
Change existing selector with tag=‘A’

1 Like

Fine in element exists activity set the property waitforready as complete and increase the TimeOut property as 60000
And try once @Abhishek_715

Buddy @Daun
For more details on this

It got an example as well
Hope this would help you
Cheers @Daun

@Palaniyappan Actually i have figured out the problem but i don’t know how to resolve it yet…the issue is with the selector of “element exists” I am using this activity inside a loop and the selector is working only for the first for others its not working. Now i am looking to formulate a generic one which works for all but seems a tedious job as there isn’t much room … i am not sure if ‘element exists’ is the right activity i have chosen to achieve the goal

I have one solution which worked for me.
1.Click on three dots in right side of Selector in Properties panel.
2.Selector Editor screen will appear.
3.Click on Indicate element and select 1st page.
4.Default section of aaname will appear just empty it.
3.Right click on it and use variable which you want to check dynamically.
6.Click Ok
This worked for me.
Note:- The variable which you use in the selector must be initialized with some default value.