What is micclass in qtp ?
It stands for Mercury interactive class constant.But it is shown as Classname in QTP environment. eg:Properties=Class name and Value=Browser,so don’t get confused. SystemUtil.Run “iexplore.exe”,”https://automationlab09.wordpress.com”
sFetchedURL=Browser(“micclass:=Browser”).Page(“micclass:=Page”).GetROProperty(“url”)
Msgbox sFetchedURL
Following is the wrong way of it’s usage: Correct way is: Browser(“Micclass:=Browser”) Example: Click on the forgot password link on the login window: Solution 1: Solution2 : Set oDesc = Description.Create Browser(“miccclass:=Browser”).Page(“micclass:=Page”).Link(oDesc).Click Browser(“miccclass:=Browser”).Page(“micclass:=Page”).Link(oDesc).Click Solution3: Set oDesc = Description.Create oDesc(“html tag”).value = “A” ———————————————————– If there is “forgot password?” instread of “forgot password” : By default QTP treats all DP properties as regular expression patterns eg: “forgot password?” is treated as forgot password hence, it throws out an error as “Cannot identify object”.This happens because there is no such text as “forgot password” ie.?(question mark) is missing from the text. Solution: Use regular expression in order to cope up with this problem. Browser(“miccclass:=Browser”).Page(“micclass:=Page”).Link(“text:=forgot password\?”).Click Solution 2 : Set oDesc = Description.Create Now QTP treats it as forgot password? 🙂 Cheers!! |