cancel
Showing results for 
Search instead for 
Did you mean: 

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

K_Sathish_Kumar
Contributor

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

Regards,
Sathish Kumar K
4 REPLIES 4
tphillips
Community Leader

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

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.


--------------------
QA Systems Architect
K_Sathish_Kumar
Contributor

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

@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

Regards,
Sathish Kumar K
tphillips
Community Leader

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

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/...


--------------------
QA Systems Architect
K_Sathish_Kumar
Contributor

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

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

Regards,
Sathish Kumar K
New Here?
Join us and watch the welcome video:
Announcements