Ask a Question

aqObject.CheckProperty, url - cmpContains troubles!

SOLVED
royd
Regular Contributor

aqObject.CheckProperty, url - cmpContains troubles!

Hi everyone

 

I am trying to verify patr of the url with the following -

 

aqObject.CheckProperty(Browsers.Item(Project.Variables.webBrowser).Window(0), "URL", cmpContains, "Login.aspx");

... but I am getting "TypeError: Browsers.Item(...).Window is not a function" error. I am probably making some silly mistake, but have no clue what that would be!

Help is deeply appreciated.

 

Dave

5 REPLIES 5
AlexKaras
Community Hero

Hi Dave,

 

What is the value of the Project.Variables.webBrowser variable?

 

Regards,
  /Alex [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
================================
royd
Regular Contributor

Hi Alex, currently it is iexplore.

 

I should also mention that I have defined Project Variable 'url' as well.

 

Thanks.

AlexKaras
Community Hero

Dave,

 

I think that the problem occurs because Browsers.Item() returns a BrowserInfo object that does not contain the .Window property while it is the Process object that contains the .Window property.

So you need to find the most suitable way for you of how to match the returned BrowserInfo object to the correct Process one.

 

Regards,
  /Alex [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
================================
royd
Regular Contributor

Thanks, Alex, I will keep trying and let you know if I can make it work.

 

Dave

royd
Regular Contributor

Hi Alex

 

Figured it out, hope this helps anyone in my situation. Following works -

 

aqObject.CheckProperty(Sys.Browser(Project.Variables.webBrowser).Page("*"), "url", cmpContains, "Login.aspx");

 

cancel
Showing results for 
Search instead for 
Did you mean: