Dynamic Selector not working to bypass missing Next Button

Goal: Data scrape the first 5 pages on a web site when there is no Next button

I am trying to get past an issue and I have searched countless topics on here and have made significant progress but I haven’t resolved the problem.

To get past no Next buttons, I created an string of numbers from 2 to 5 called PageNum, used a spliter variable to split the string, and saved each value in a separate variable called PageNumArray. Then I wrote a custom selector and used Assign activity to assign to a dynamicSelector variable (logic below). Finally, I used a For Each activity to scrape the page for each PageNumArray and passed the dynamicSelector variable through the NextLinkSelector in the properties for the DIV. It did not work!

Logic for dynamicSelector (ignore the right quotes around <): "<“html title=’* Jobs in United States | LinkedIn’ /> “<“webctrl aaname=’”+Item.ToString()+”’ parentid=‘ember*’ tag=‘BUTTON’ type=‘submit’ />”

Any suggestions.

Screenshot 1
Screenshot1

Screen shot 2

Can you post the selector you are getting in the dynamicSelector variable and the screenshot of the error @sofsheikh?

Hi,
I’m not getting an error because the workflow runs but it does not go to the next pages. Screen shot 2 in the original post shows how I"m using the dynamicSelector to go to the next page. Here is the logic for the dynamicselector:

Logic for dynamicSelector (ignore the right quotes around <): "<“html title=’* Jobs in United States | LinkedIn’ /> “<“webctrl aaname=’”+Item.ToString()+”’ parentid=‘ember*’ tag=‘BUTTON’ type=‘submit’ />”

I resolved this. For those who are interested, I used the same logic as described above but I had to select a better selector. I did this by inspecting the element on the web browser and inspecting the html. I copied the html code and with a little trial and error found the selector which was stable and functional. Here is the new logic of the dynamicSelector (the logic ended up being simpler than the previous attempt):

“<“webctrl aaname='Page " +Item.ToString()+”’ parentid=‘ember*’ tag=‘BUTTON’ type=‘submit’ />”

You will notice that Page was added and I was only able to found this because I inspected the html for the element in the browser.

1 Like

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