cancel
Showing results for 
Search instead for 
Did you mean: 

refresh page

Highlighted
Occasional Contributor

refresh page

When I execute my script in TestComplete6, it opens the application and clicks one of the links on home page and display the following error "Internet Explorer cannot display the web page". In order to continue my script execution successfully, I need to press F5 key manually on key board for page refresh. Can any body suggest how to solve this issue with out manual interference.
dhanu
5 REPLIES 5
Highlighted

RE: refresh page

Hi,




Place the code below after the line where the click is performed:




    //JScript


    var AW = Sys.Desktop.ActiveWindow();

    AW.Page("*").Keys("[F5]");




-----

Alexander
Customer Care Manager
Highlighted
Occasional Contributor

RE: refresh page

Hi Alex,



Thank you.I am using VBscript.Please can you send me VBScript code for page refresh.
dhanu
Highlighted

RE: refresh page

Hi,




Here is the VBScript code:




    ' VBScript


    Dim AW

    Set AW = Sys.Desktop.ActiveWindow()

    Call AW.Page("*").Keys("[F5]")




-----

Alexander
Customer Care Manager
Highlighted
Occasional Contributor

RE: refresh page

Hi Alex,



Still I have problem in refreshing page.Please see the script beolw.



Sub QC_Links

 Call QC_Initialize

 Call Close_IE

 

  Dim p1

  Dim w1

  Dim AW

 

  TestedApps.iexplore.Run

 

 Set p1 = Sys.Process("iexplore")

  p1.Page("https://localhost/easylink/").Panel("pagewidth").Table(0).Cell(2, 0).Panel("content").Panel("contentContainer").Panel(0).Table(0).Cell(1, 1).Link(0).Click

  Set w1 = p1.Page("https://localhost/LabManager/EasyQC/views/period/ControlDashboard.faces?auth=Y")

 

  Set AW = Sys.Desktop.ActiveWindow()

  Call AW.Page("*").Keys("[F5]")

 

  Call w1.Panel("container").Panel(0).Table("middle").Cell(0, 1).Panel(0).Panel(0).Panel("dashboardLinksContainer").Link(2).Panel(0).TextNode(1).Click(233, 33)

  w1.Panel("container").Panel(0).Table("middle").Cell(0, 0).Panel(0).Link(3).Click

  w1.Panel("container").Panel(0).Table("middle").Cell(0, 0).Panel(0).Link(4).Click

  w1.Panel("container").Panel(0).Table("middle").Cell(0, 0).Panel(0).Link(5).Click

 

  Call Close_IE

End Sub
dhanu
Highlighted

RE: refresh page



Hi,






It is a bit strange as your code works fine for me. Nevertheless, I can suggest that you call the native Refresh method of the page object:



--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors