Cannot access MS SilverLight controls in IE

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
ngrishakin
Posts: 42
Joined: Fri Oct 04, 2013 9:47 pm

Cannot access MS SilverLight controls in IE

Post by ngrishakin » Thu Oct 13, 2016 10:33 pm

Looks like I cannot access any SilverLight components.
I have a search button on my page and RxPath to it is

Code: Select all

“/dom[@caption='CreateInvoice']//div[#'silverlightControlHost']/?/?/form[@name='Silverlight Control']/button[@automationid='SearchButton']/picture[@classname='Image']”
But when I try to use this path in my code I’m getting the following exception:
“Result StackTrace:
at Ranorex.Adapter..ctor(Element element)
at Ranorex.WebElement.op_Implicit(Element element)
at CatalystRnrx.ObjectRepository.CreateInvoice.get_SearchBatton() in C:\qa\BDD_Automation\CatalystRnrx\CatalystRnrx\ObjectRepository\CreateInvoice.cs:line 25
at CatalystRnrx.TestClass.TestMethod7() in C:\qa\BDD_Automation\CatalystRnrx\CatalystRnrx\TestClass.cs:line 257
Result Message: Ranorex.CapabilityNotSupportedException : The element does not support the required capability 'webelement'.”

May be it's due to trial license or I missed some references in MY VS project.
Thanks for all help!

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Cannot access MS SilverLight controls in IE

Post by odklizec » Fri Oct 14, 2016 7:45 am

Hi,

I'm afraid, there is a lot of missing info in your post so there is not much we can do for you. Please answer these essential questions:
Ranorex version (latest and greatest is 6.1)?
OS and browser name/version?
Please post a Ranorex snapshot (not screenshot) of the problematic (or its parent).
Please post the code you are using to access the control.
Also, have you tried to access the control via recording?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

ngrishakin
Posts: 42
Joined: Fri Oct 04, 2013 9:47 pm

Re: Cannot access MS SilverLight controls in IE

Post by ngrishakin » Fri Oct 14, 2016 3:59 pm

Pavel, here is my information:
1. Ranorex version: 6.1
2. OS Win 7 Pro
3. IE v. 11
4. Ranorex Recorder and Play Back works fine

Ranorex Snapshot file is attached.

My Object Repository Class:

Code: Select all

public WebElement SearchBatton
    {
     get { return Host.Local.FindSingle("/dom[@caption='CreateInvoice']//div[#'silverlightControlHost']/?/?/form[@name='Silverlight Control']/button[@automationid='SearchButton']/picture[@classname='Image']", Global.WaitTime); }
        }
Now I'm calling it from NUnit test case:

Code: Select all

           createInvoice.SearchBatton.Click();
The last call returns the error:
Result Message: Ranorex.CapabilityNotSupportedException : The element does not support the required capability 'webelement'.

I would really appreciate any help on this.
Thanks!
- Nik
You do not have the required permissions to view the files attached to this post.

User avatar
OverflowingStack
Posts: 8
Joined: Thu Mar 27, 2014 9:35 pm
Location: Clearwater, Florida
Contact:

Re: Cannot access MS SilverLight controls in IE

Post by OverflowingStack » Fri Oct 14, 2016 6:29 pm

@ngrishakin,

This is a Silverlight control, specifically a picture. Therefore, your return type must be of type Ranorex.Picture or Ranorex.UIAutomation (most general Adapter type for Silverlight controls).

I hope this helps! :D

ngrishakin
Posts: 42
Joined: Fri Oct 04, 2013 9:47 pm

Re: Cannot access MS SilverLight controls in IE

Post by ngrishakin » Fri Oct 14, 2016 10:47 pm

Yes It did. Ranorex needs to update their API docs. Record and Playback is not for everyone.
Thanks a lot for your help!!!

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Cannot access MS SilverLight controls in IE

Post by Support Team » Sat Oct 15, 2016 10:39 pm

Hi ngrishakin!
ngrishakin wrote:Ranorex needs to update their API docs
It would be great if you could give as a hint on where you would expect us to improve the API docs.

Just a hint: Apart from configuration/instrumentation, we do not have specialized documentation for every technology. This is by design, since Ranorex let's you handle all technologies in a similar way.

You can find the "generic" documentation on how to work with Ranorex adapters here:
http://www.ranorex.com/support/user-gui ... apter.html

Regards,
Alex
Ranorex Team