cancel
Showing results for 
Search instead for 
Did you mean: 

Looking into IDispatchWrapper-Objects

SOLVED
Occasional Contributor

Looking into IDispatchWrapper-Objects

Hi *,

 

how can I look into a IDispatchWrapper-Object (and also the famous SafeArrayWrapper) to find out what properties and/or methods it supports?

 

Regards

 

Ulrich

1 ACCEPTED SOLUTION

Accepted Solutions
Occasional Contributor

Re: Looking into IDispatchWrapper-Objects

Hi Alex,

 

right, wie use the QuerySelector methods provided by TC. They work fine. And they give back these wrapper objects where up to now I did not find a pythonis way to look into them - just becaus they are a kind of com objects coming form the language TC was written in.

 

So as far as I see I have to try with the DOM object definition and then coding a try and arroe method to identify the DOM object behind the wrapper. Not very elegant but I think it is the only way. What I was dreaming of was a kind of dict-method as known from python to get a api information, but ...

 

Regards

 

Ulrich

7 REPLIES 7
Community Hero

Re: Looking into IDispatchWrapper-Objects

Hi Ulrich,

 

Any more details please?

Is this somehow related to TestComplete?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Occasional Contributor

Re: Looking into IDispatchWrapper-Objects

Hi Alex,

 

most of the time we use CSS selectors for accessing webelement. We like it more than the NameMapping, especially because we have a lot of dynamic elements.  As it can be seen in the posts before we use python to do the work, what works very well

 

When we access a WebElement there often comes a SavaArrayWrapper or DispatchWrapper object. I've read a lot of stoff about it and did a lot of dir-ing into the objects. But up to now I did not find a way to analyse the api of such an object related to the attributes or methods they wrap. So it is a lot of try and error, what is a little bit frustrating - ok, very frustrating ;-)

 

So if you or anyone has an idea how to identify the wrapped apis of the objects I would be more than happy.

 

Regards

 

Ulrich

 

 

Community Hero

Re: Looking into IDispatchWrapper-Objects

Hi Ulrich,

 

Some example will help... but my current guess is that you are talking about .QuerySelector() and .QuerySelectorAll() methods provided by TestComplete.

I did not use them (and this seems to be not mentioned in the documentation), but I think that they behave exactly like the .EvaluateXPath() and .FindChildByXPath() methods. I.e.: if the found web element can be matched to the object from the Object Browser, then the matched object is returned. Otherwise, native DOM element is returned.

If the above is correct, then the objects that you are talking about should be either native objects/interfaces provided by the given web elements (and thus you should read relevant DOM documentation) or are provided by Python itself (and thus should be addressed in Python's docs). Though I really doubt about latter and tend to think that this is something from the native DOM area...

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Highlighted
Community Manager

Re: Looking into IDispatchWrapper-Objects

Hi @ucuber,

 

Was the question resolved, or do you need any more assistance?

 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Occasional Contributor

Re: Looking into IDispatchWrapper-Objects

Hi Alex,

 

right, wie use the QuerySelector methods provided by TC. They work fine. And they give back these wrapper objects where up to now I did not find a pythonis way to look into them - just becaus they are a kind of com objects coming form the language TC was written in.

 

So as far as I see I have to try with the DOM object definition and then coding a try and arroe method to identify the DOM object behind the wrapper. Not very elegant but I think it is the only way. What I was dreaming of was a kind of dict-method as known from python to get a api information, but ...

 

Regards

 

Ulrich

Occasional Contributor

Re: Looking into IDispatchWrapper-Objects

Hi Tanya,

 

I would say there is no real solution as I wrote in my reply to Alex. Think we can close the case w.o. having found a "real" solution.

 

Regards

 

Ulrich

 

 

Community Hero

Re: Looking into IDispatchWrapper-Objects

Hi Ulrich,

 

I am not sure that I got what exact problem do you have and why you cannot use TestComplete objects in your test code. Can you provide some specific case so that we can look for specific solution and consider if it can be made generic?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
Top Kudoed Authors