Hi,
I am getting following error while trying to access the textbox/button using ranorex keywords (Ranorex.Text and Ranorex.Button)
Code_1:
Text textbox="/dom[@domain='www.google.co.in']//input[#'gbqfq']";
textbox.TextValue = "Ranorex";
Failed due to exception Ranorex.CapabilityNotSupportedException: The element does not support the required capability 'text'
Code_2:
WebElement Elem="/dom[@domain='www.google.co.in']//input[#'gbqfq']";
Elem.PressKeys("Ranorex");
This is absolutely working fine.
The same this happening for Button objects as well.
Am I missing something?
I am trying to develop a keyword driven framework. But I am facing these kind of issues while trying to develop a keywords.
Thanks,
Rajendra
Failed due to exception Ranorex.CapabilityNotSupportedExcept
Re: Failed due to exception Ranorex.CapabilityNotSupportedExcept
I guess I made a small mistake:
The below syntax is working for me:
Ranorex.InputTag input = "/dom[@domain='www.google.co.in']//input[#'gbqfq']";
input.TagValue = "Ranorex";
But, I am getting issue while trying to access buttons using below code:
Ranorex.Button btnn = "/dom[@domain='www.google.co.in']//button[@id='gbqfb']";
btnn.Click();
Failed due to exception Ranorex.ElementNotFoundException: No element found for path './/input[#'gbqfq']' within 10s.
Can some one please help me out?
Thanks,
Rajendra
The below syntax is working for me:
Ranorex.InputTag input = "/dom[@domain='www.google.co.in']//input[#'gbqfq']";
input.TagValue = "Ranorex";
But, I am getting issue while trying to access buttons using below code:
Ranorex.Button btnn = "/dom[@domain='www.google.co.in']//button[@id='gbqfb']";
btnn.Click();
Failed due to exception Ranorex.ElementNotFoundException: No element found for path './/input[#'gbqfq']' within 10s.
Can some one please help me out?
Thanks,
Rajendra
Re: Failed due to exception Ranorex.CapabilityNotSupportedExcept
Sorry, the error message for the above mentioned code was:
Ranorex.Button btnn = "/dom[@domain='www.google.co.in']//button[@id='gbqfb']";
btnn.Click();
Failed due to exception Ranorex.CapabilityNotSupportedException: The element does not support the required capability 'button'.
Ranorex.Button btnn = "/dom[@domain='www.google.co.in']//button[@id='gbqfb']";
btnn.Click();
Failed due to exception Ranorex.CapabilityNotSupportedException: The element does not support the required capability 'button'.
Re: Failed due to exception Ranorex.CapabilityNotSupportedExcept
Hello
Have you tried working with a repository/Spy ? It's easier to maintain I think.
Regards
EDIT: Could you try :
Have you tried working with a repository/Spy ? It's easier to maintain I think.
Regards
EDIT: Could you try :
ButtonTag myHtmlButton="/dom[@domain='www.google.co.in']//button[@id='gbqfb']";From the documentation :
- - Button Represents a push button.
- ButtonTag The HTML 'button' tag.
A simple thank you always does wonders !
Re: Failed due to exception Ranorex.CapabilityNotSupportedExcept
hi
thanks for the quick reply.
actually, I do not want to use repository. I want to create a generic keyword driven framework.
I tried the syntax postedwabove but still nno luck
thanks
raj
thanks for the quick reply.
actually, I do not want to use repository. I want to create a generic keyword driven framework.
I tried the syntax postedwabove but still nno luck
thanks
raj
Re: Failed due to exception Ranorex.CapabilityNotSupportedExcept
Strange.
The buttontag adapter worked fine for me with Chrome.
Maybe try the support ?
Regards
The buttontag adapter worked fine for me with Chrome.
Maybe try the support ?
Regards
A simple thank you always does wonders !
Re: Failed due to exception Ranorex.CapabilityNotSupportedExcept
Hi,
When you work with web elements you need to ensure that you also use the right adapter types.
For instance, when you try to create an adapter for a web button: "/dom[@domain='www.google.co.in']//button[@id='gbqfb']" you need to create a ButtonTag adapter:
Regards,
Markus
When you work with web elements you need to ensure that you also use the right adapter types.
For instance, when you try to create an adapter for a web button: "/dom[@domain='www.google.co.in']//button[@id='gbqfb']" you need to create a ButtonTag adapter:
ButtonTag myHtmlButton="/dom[@domain='www.google.co.in']//button[@id='gbqfb']";In the Detail's tab of Ranorex Spy you will see what Capability is used to define the specific web element: you shouldn't face issues when you use the specific Capability shown in Spy.
Regards,
Markus
Re: Failed due to exception Ranorex.CapabilityNotSupportedExcept
Markus,
I think part of the confusion here is that Ranorex uses the same RXPath tags for two different Object types.
For example, the types Button and ButtonTag both use the RxPath "/button" by default. I think it would be better if the object and path matched.
So, the Button object would have a "/button" path by default, and the ButtonTag object would have a "/buttontag" path by default. This would clear up a lot of confusion.
You don't need to change anything but the default generator for the ButtonTag object, so no one would need to change their tests. ButtonTag would still work with the "/button" path, but by default it would generate a "/buttontag" path from now on. This would allow backwards compatibility but create a distinction between the two items.
There are other similar situations, but buttons are the most obvious.
Can we add that as a feature request?
I think part of the confusion here is that Ranorex uses the same RXPath tags for two different Object types.
For example, the types Button and ButtonTag both use the RxPath "/button" by default. I think it would be better if the object and path matched.
So, the Button object would have a "/button" path by default, and the ButtonTag object would have a "/buttontag" path by default. This would clear up a lot of confusion.
You don't need to change anything but the default generator for the ButtonTag object, so no one would need to change their tests. ButtonTag would still work with the "/button" path, but by default it would generate a "/buttontag" path from now on. This would allow backwards compatibility but create a distinction between the two items.
There are other similar situations, but buttons are the most obvious.
Can we add that as a feature request?
Shortcuts usually aren't...
Re: Failed due to exception Ranorex.CapabilityNotSupportedExcept
Hi Markus,
Thank you for the reply.
The below syntax is working absolutely fine.
Ranorex.ButtonTag btnn = "/dom[@domain='www.google.co.in']//button[@id='gbqfb']";
btnn.Click();
Thanks,
Rajendra
Thank you for the reply.
The below syntax is working absolutely fine.
Ranorex.ButtonTag btnn = "/dom[@domain='www.google.co.in']//button[@id='gbqfb']";
btnn.Click();
Thanks,
Rajendra