We are automating Silver Light Application
We have to get Collection of Elements from a Table.
There are 500 Elements.
20 elements are available in Screen display. Others are not in screen display, but available in the Application.
I want to get the 499th Element which is not visible in screen display. Unable to get the Element. Throwing Exception.
//Working
Ranorex.Table tblSupplier = pilstMainTabPage[0].FindSingle<Ranorex.Table>("<RxPath Of the Table>");
//The Below code is working if the Element is available in Screen display
//The Below code is NOT working if the Element is NOT available in the Screen display
Ranorex.Text txtSupplierHdr = tblSupplier.FindSingle<Ranorex.Text>(".//text[@name='12345']");
How to get Hidden object? (Its Type is Ranorex.Core.Element)
How to get Hidden Ele(Not available in Screen display))
How to get Hidden Ele(Not available in Screen display))
Regards,
Thangavel.S
Thangavel.S
Re: How to get Hidden Ele(Not available in Screen display))
Is it truly valid but not visible or does it truly not exist unless needed?
Some apps will not create an unneeded element until there is a use for it. In that case, the element may in fact be a valid element within your AUT when it is being used, but may not exist when it is not being used.
Can you use Spy to verify that the element does indeed exist but is just marked as visible=false?
You can also use Ranorex to get an iList of all elements (of a certain type) that are valid within your AUT then parse that list yourself and check if the element exists or not at any given time.
Some apps will not create an unneeded element until there is a use for it. In that case, the element may in fact be a valid element within your AUT when it is being used, but may not exist when it is not being used.
Can you use Spy to verify that the element does indeed exist but is just marked as visible=false?
You can also use Ranorex to get an iList of all elements (of a certain type) that are valid within your AUT then parse that list yourself and check if the element exists or not at any given time.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: How to get Hidden Ele(Not available in Screen display))
Object is valid and Visible = true. But it is not displaying in the current Screen. It is below the Screen. Refer the screenchot attached. I've pointed (Red arrow) the required object's location in the screen. I Used UseEnsurevisible(). But No use. We need to focus on the object and it should be clicked.
My requirement is to make the object visible into current screen location when I focus on it.
I can scroll the browser to make the object come within the screen display. But without scrolling the browser, How to make the object automatically "Visible"/ Focus into Screen Display.
My requirement is to make the object visible into current screen location when I focus on it.
I can scroll the browser to make the object come within the screen display. But without scrolling the browser, How to make the object automatically "Visible"/ Focus into Screen Display.
You do not have the required permissions to view the files attached to this post.
Regards,
Thangavel.S
Thangavel.S
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to get Hidden Ele(Not available in Screen display))
Hi,
Would it be possible to send us a Ranorex Snapshot of the entire application to analyze the issue in more deep?
How to create a snapshot:
http://www.ranorex.com/support/user-gui ... files.html
Is this WPF control embedded in a browser?
Is this WPF element a custom control or just a standard datagrid?
Thanks in advance.
Regards,
Peter
Ranorex Team
Would it be possible to send us a Ranorex Snapshot of the entire application to analyze the issue in more deep?
How to create a snapshot:
http://www.ranorex.com/support/user-gui ... files.html
Is this WPF control embedded in a browser?
Is this WPF element a custom control or just a standard datagrid?
Thanks in advance.
Regards,
Peter
Ranorex Team
Re: How to get Hidden Ele(Not available in Screen display))
Sorry for the late reply.
Yes. It is available inside the Sharepoint2010 Site. Herewith I've attached the Snapshot (zipped) of that control.
Yes. It is available inside the Sharepoint2010 Site. Herewith I've attached the Snapshot (zipped) of that control.
You do not have the required permissions to view the files attached to this post.
Regards,
Thangavel.S
Thangavel.S
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to get Hidden Ele(Not available in Screen display))
From your snapshot it is clear to me that invisible cells are not yet created by the application. The rows are there, but not the cells in them. Only the first two or three invisible rows also have cell elements in them.
I guess the grid creates the cells when you scroll to them.
And it seems that the grid control does not report its size correctly and that's why the EnsureVisible does not work on the first two or three invisible rows, since Ranorex thinks these rows are already visible (due to the wrong size of the grid).
Does EnsureVisible work if you invoke it on an invisible row further down?
As a workaround you can scroll down using the keyboard, i.e. generate a keyboard press on the "Down" button after reading one row.
Regards,
Alex
Ranorex Team
I guess the grid creates the cells when you scroll to them.
And it seems that the grid control does not report its size correctly and that's why the EnsureVisible does not work on the first two or three invisible rows, since Ranorex thinks these rows are already visible (due to the wrong size of the grid).
Does EnsureVisible work if you invoke it on an invisible row further down?
As a workaround you can scroll down using the keyboard, i.e. generate a keyboard press on the "Down" button after reading one row.
Regards,
Alex
Ranorex Team