Ask a Question

not able to identify the objects whic are not visible on screen

Mr_Bro
Champion Level 0

not able to identify the objects whic are not visible on screen

Hi Team,

 

our application is built on React and i have challenges while identifying the table's header values.

the table object is exactly not a table in DOM instead a div object, few header are not visible on screen and if i try identifying the object using xpath of find methods i get null object but when I scroll the div and make it visible on screen and try finding the object using same xpath, i get the required object.

 

request you to please guide me how to proceed with the same.

thanks in advance.

 

Thanks and Regards,

Sathish Kumar K

4 REPLIES 4
tphillips
Frequent Contributor

You can use the scrollIntoView() function on the element to make it visible, before interacting with it.

You might need to change the parameters to make it function correctly for your use case.


--------------------
Senior SQA Automation Engineer
Mr_Bro
Champion Level 0

@tphillips ,

If I am able to catch the object, I can use the scrollintoview(true) function and work on it,

But in my case the object itself I'm not aable to find because it is not available in dom untill I do a manual scroll.

Can you please help me 

Thanks and regards,

Sathish

tphillips
Frequent Contributor

If the object doesn't exist in the DOM until you scroll to it, you can write a loop to scroll the page until the object exists in the DOM.

 

Here is a link to a previous answer: https://community.smartbear.com/t5/TestComplete-Functional-Web/Keyword-Test-Webpage-Scroll-Down/m-p/...


--------------------
Senior SQA Automation Engineer
Mr_Bro
Champion Level 0

I wanted to move horizontal scroll and I'm using python script, can you please help me with sample code which I can make use of it please.

 

Thanks

cancel
Showing results for 
Search instead for 
Did you mean: