scrolling webpage

I have a web application which contains number of rows. I need to process all the rows in the webpage. I am using dynamic attribute feature (incrementing counter) to process each claim. To be specific, the HTML attribute for first element is
/HTML/BODY(1)/IFRAME(2)/HTML/BODY(1)/FORM(1)/DIV(2)/TABLE(1)/TBODY(1)/TR(1)/TD(1)/DIV(2)/DIV(2)/DIV(2)/TABLE(1)/TBODY(1)/TR(1)/TD(1)/DIV(1)/DIV(1)/SPAN(1)
and for second element, it is
/HTML/BODY(1)/IFRAME(2)/HTML/BODY(1)/FORM(1)/DIV(2)/TABLE(1)/TBODY(1)/TR(1)/TD(1)/DIV(2)/DIV(2)/DIV(2)/TABLE(1)/TBODY(1)/TR(2)/TD(1)/DIV(1)/DIV(1)/SPAN(1)

I am using a counter to increment the value in TR() and passing this path to business object access the rows in the table. Lets say there are 30 rows in total in the table and first 10 rows are visible on the page. In this scenario, I am able to access these first 10 rows by passing the path dynamically. When I tried to access the 11th element, I got an error message saying "No elements match the supplied query terms". When I manually scrolled few rows so that they are visible on the screen (let say rows 5-15 are now visible on the screen), then I am able to access the 11th row.

My question is - do I need to scroll to make next items visible on the screen, even though I know the HTML path for that row? Is there any other way than scrolling, where I can access the rows using the HTML path (like blue prism automatically reading the row though it is not visible on the screen)?
 

VJR

Well-Known Member
Hi Highspirits,

There shouldn't be any valid reason for this to happen when you are using the HTML paths of the table elements. Are you using Sendkeys anywhere so that the table is not accessible when not visible within the page?

Another approach to read an HTML table is to spy the table in HTML mode and then use a Reader stage -> Get Table action which will return a collection of all elements of the table. Just make sure that when you correctly spy the table, the Application Modeller shows TABLE in the Tag name attribute.
 
Hi VJR,

Thank you for taking time to reply. I am not using SendKeys anywhere in the bot (so far). Regarding extracting the table data as a collection, I do not need this functionality as my task is to select a particular row (given some criteria is met) by clicking on it which will open up few buttons from which I need to click particular button to navigate to other screens related to that row. So I have to select the row to continue processing further.
 

VJR

Well-Known Member
Hi Highspirits,

- I still do not see a genuine reason to not able to access the element using the HTML path. There is something missing.
Spy that 11th element (maybe a textbox or a button or a label) using a Reader stage, use the Get Table action and get the path and see what HTML path it shows.

1529038513195.png

- Also I'm unable to see how your webpage looks like. Maybe there is a table and other sub tables which will be correctly identifiable during spying if the mouse if moved slowly towards every single border/element of the table.

- Secondly, what did you experience that you said you cannot use Page Down since I was easily able to do a scroll down on a web page. Only thing is in this approach you will need to know how many rows are visible when a single scroll is made and so on for the subsequent scrolls.
 
Hi VJR,

Below are the answers to your questions.

- I still do not see a genuine reason to not able to access the element using the HTML path. There is something missing.
Spy that 11th element (maybe a textbox or a button or a label) using a Reader stage, use the Get Table action and get the path and see what HTML path it shows. --> As I mentioned, the HTML path for the 11th element is same as expected (incrementing counter) the reason being, if I scroll the records to make the 11th element visible, I am able to retrieve that data without any changes in the bot. So no issue with the HTML path.

- Also I'm unable to see how your webpage looks like. Maybe there is a table and other sub tables which will be correctly identifiable during spying if the mouse if moved slowly towards every single border/element of the table. --> I tried every possible situation but its not returning the complete table data.

- Secondly, what did you experience that you said you cannot use Page Down since I was easily able to do a scroll down on a web page. Only thing is in this approach you will need to know how many rows are visible when a single scroll is made and so on for the subsequent scrolls.--> I was also able to scroll the table data in other webpages but not in the webpage I am working on.

I am thinking the reason for these three issues might be to do with how the HTML page is designed.

The scroll down is working if I click anywhere on the table scroll bar and then click "Page Down" button but the issue here is, I am not able to spy the scroll bar in the webpage. As soon as I moved the mouse closer to scroll bar to identify it, the entire table is getting selected. I tried spying using all the 4 modes but none worked.

To solve the issue, I used Surface Automation using which I spied the scroll bar. Then I clicked the scroll bar and then used Global Send Key Events to send {PGDN} and then the table is scrolling.
 

VJR

Well-Known Member
Hi Highspirits,

Before I provided you the earlier response, this is what I did.
View attachment 1529585991342.png

As you can see I have not spied the outside browser of the window but the page area.

View attachment 1529586210168.png


This shows the element type as Window in the Application Modeller.
View attachment 1529586258867.png
(Since you said your webpage is a bit different, you can also give a try spying the outside border of the window to activate)

Then I've activated the Window element and then a scroll which successfully scrolled the window.
This is a general convention in any web application wherein focusing a right element (even a textbox) and then scrolling will scroll the page. Maybe you tried these but a right focus to be identified is required.

View attachment 1529586045238.png


You can try these, if not already done, to get rid of the less reliable Region Mode.


"As soon as I moved the mouse closer to scroll bar to identify it, the entire table is getting selected."
I have a thought here, I hope that the zoom size of the page is not on an increased level such that the table is overlapping over the scroll bar and hence entire table is getting selected. So something to check on that too.
 
Hi VRJ,

Thanks for the reply. Could you please let me know what command/keys you used in "Scroll Browser" action. Is the Page down button?
 

sandeep yel

New Member
Home Button - "{HOME}" Scrolling to top most part of the web page, make sure the webpage is active or just click on any part of the page and then use this global send key
 

sonuiiml

New Member
I too faced the same issue and would like to share how I handled it.
So when the bot completes reading the first rows of table in focus, add a navigate stage. In that navigate stage add the table element for the for the last row(spy the cell of table in HTML mode and keep the path as dynamic. ) of the table which bot could read and then add a click and focus action. The table will automatically scroll to the precise location from where the bot can read the value for second table
 
Top