Ask a Question

How can I assert if a value is equal to another

clausbraatz
New Contributor

How can I assert if a value is equal to another

How can I assert that a value is equals to another?. What I am tryin to do is assert if a value is true, or maybe assert if a string is equals to another, but not using UI object properties. Is there any checkpoint or something like that to work with own variables?
Claus
39 REPLIES 39

Sorry I don't understand your question

My question was "Why doesn't wText property show in Object spy?"

 


@tristaanogre wrote:

@You wrote:

 

"I have seen that the wText property gives tooltip text. Then why does that not appear in the property list?"

 

So...  which is it?  


 

Regards

Partha Mandayam
Software Consultant
tristaanogre
Esteemed Contributor

Different objects have different properties available depending upon the type of object. Text editors and such have the "wText" property.  

So, in your case, the tool-tip text may not be in the wText property... you may need to look elsewhere.

 

The general point of all my answers is this: Go searching, go looking... use Object Spy to investigate components and such until you find where your tool-tip text is referenced.  There are MANY different places that such text can show up depending upon how your application is developed.  I don't know the details of your application so it's up to you to do the investigation.  I can suggest different ways and places to look... but in short, Object Spy is your tool for the job and you'll just need to dig until you find it.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

I've looked at all the properties in Object Spy and none has the tooltip text.

Then how to compare the tooltip text and determine if the test passed?

All the documentation says that tooltip text is in wText property

Then why is that not seen here?

 


@tristaanogre wrote:

Different objects have different properties available depending upon the type of object. Text editors and such have the "wText" property.  

So, in your case, the tool-tip text may not be in the wText property... you may need to look elsewhere.

 

The general point of all my answers is this: Go searching, go looking... use Object Spy to investigate components and such until you find where your tool-tip text is referenced.  There are MANY different places that such text can show up depending upon how your application is developed.  I don't know the details of your application so it's up to you to do the investigation.  I can suggest different ways and places to look... but in short, Object Spy is your tool for the job and you'll just need to dig until you find it.


 

Regards

Partha Mandayam
Software Consultant
tristaanogre
Esteemed Contributor

Again, I don't know your application.  For me, it would be a time spent investigating the tool tip itself (perhaps it's in contentText or innerHTML), or perhaps it's in the object that spawns the tool tip... or could be in an entirely different object.

 

In other words: I cannot answer that question because I don't know your application.

 

Now, if you want folks here to be able to help you, we'll need screen shots of the Object Spy screen, including all advanced properties, of the object that supposedly has the tool tip, the tool tip object (if you have a spy screen for that), etc.... we need more info.  

 

This is going to take "leg-work".  You'll need to spend time investigateing properties of MANY objects to find your tool tip text.  


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

I have attached screenshots of the tooltip error which I need to capture and 3 screenshots showing all the object spy advanced properties.

I did not find a contentText or innerHtml property anywhere

Hope this helps.

Regards

Partha Mandayam
Software Consultant
tristaanogre
Esteemed Contributor

OK... so, I see what you need to see....  But with those object spy screenshots... what EXACTLY are you spying?  Can you indicate which component you have highlighted to get the spy?

 

And.. I repeat....  you may need to investigate MULTIPLE components on the screen to find, specifically, what you're looking for.  Instinctually, looking at your screenshot, I would put the object spy on the red exclamation point on the far right side of the screen and see what comes up in object spy.  

 

If that doesn't work, then I would use the point and fix and see if, when you hover over the exclamation point, you can then do an object spy on the tool tip itself.

 

If THAT doesn't work, then my next place to look would be to look at the entire window of Lane Information to see if there is a tool-tip property or something available there...

 

And if THAT doesn't work... I would keep on searching.  It's there somewhere... but I repeat... you will need to do investigation.  Put on your Sherlock Holmes hat and see what you can find.

 

And... if all else fails... contact your developer and ask "Hey, where does that tool-tip reside?  I want to be able to validate it in the automation and I'm having a hard time finding it in the component objects."


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available


@tristaanogre wrote:

OK... so, I see what you need to see....  But with those object spy screenshots... what EXACTLY are you spying?  Can you indicate which component you have highlighted to get the spy?

 

It is the red exclamation point

 

And.. I repeat....  you may need to investigate MULTIPLE components on the screen to find, specifically, what you're looking for.  Instinctually, looking at your screenshot, I would put the object spy on the red exclamation point on the far right side of the screen and see what comes up in object spy.  

 

If that doesn't work, then I would use the point and fix and see if, when you hover over the exclamation point, you can then do an object spy on the tool tip itself.

 

That also doesn't have any tooltip text

 

If THAT doesn't work, then my next place to look would be to look at the entire window of Lane Information to see if there is a tool-tip property or something available there...

 

That also doesn't have any tooltip text. Actually what's the logic of looking at the whole Lane Information window

 

And if THAT doesn't work... I would keep on searching.  It's there somewhere... but I repeat... you will need to do investigation.  Put on your Sherlock Holmes hat and see what you can find.

 

And... if all else fails... contact your developer and ask "Hey, where does that tool-tip reside?  I want to be able to validate it in the automation and I'm having a hard time finding it in the component objects."


Can you clarify what you mean by "Hey, where does that tool-tip reside?

 

Regards

Partha Mandayam
Software Consultant

@tristaanogre means that you need to talk to your developer and ask more questions about this object.  We don't know how your software works.  Once your developer explains it, we can help you use TestComplete to test it.


Marsha_R
[Community Hero]
____
[Community Heroes] 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. Posts made by [Community Heroes]
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.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

@mcp111 See my response in your other thread: https://community.smartbear.com/t5/TestComplete-General-Discussions/Can-anybody-explain-this-tooltip...


Thanks,
Carson

Click the Accept as Solution button if my answer has helped

Exactly what questions should I ask the developer?

 


@Marsha_R wrote:

@tristaanogre means that you need to talk to your developer and ask more questions about this object.  We don't know how your software works.  Once your developer explains it, we can help you use TestComplete to test it.


 

Regards

Partha Mandayam
Software Consultant
cancel
Showing results for 
Search instead for 
Did you mean: