将"测试"进行到底!~!

About: Browser.back is not working (Favourites)

上一篇 / 下一篇  2008-04-20 19:43:21 / 个人分类:QTP板块

I am working on QTP 9.5 and Ie 6.0.
Browser("micclass:=Browser","creation time:= 1").Back is not working for me.
I have seen other posts on this issue and tired other workarouunds also.I unistalled QTP and reistalled it. but still not able to get this issue solved.

Any other suggestions please?

ANSWER:

First:

Here is a workaround. Call the following method from your scrīpt

Code:



Public Sub bBack(gBrowser)

Set bWin = Window("hwnd:="&gBrowser.GetROProperty("hwnd"))
bWin.click 0,300

Set WshShell = CreateObject("Wscrīpt.Shell")
WshShell.AppActivate "Windows Internet Explorer"
wait(1)
WshShell.SendKeys "{BACKSPACE}"

Set WshShell = nothing
Set bWin = nothing

End Sub
Second:
Ren, I am using IE 6.0 and QTP 9.5. I did run the following test which worked:

Browser("micclass:=Browser").Navigate("http://www.yahoo.com")
Browser("micclass:=Browser").back

This returned it to the original page.

Is is possible that you are using the "creationtime" incorrectly? If you have one browser open creationtime should be "creationtime:=0" and not "1" as you have it in your scrīpt. Hope this helps.
(Statement: This Post come from sqaforums.com)

TAG: QTP板块

 

评分:0

我来说两句

Open Toolbar