Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remote server machine does not exist
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi

I am using this .vbs file to start QTR test.

Code:
Dim qtpApp    
Dim qtpTest      
Set qtpApp = CreateObject("QuickTest.Application")
qtpApp.Visible = true
qtpApp.Open "C:\Documents and Settings\me\Desktop\bin\TestData", true  
Set qtpTest = qtpApp.Test  
qtpTest.Run
qtpTest.Close
qtpApp.quit
Set qtTest = Nothing
Set qtApp = Nothing

First time it works well but sometimes it gives this error

Code:
The remote server machine does not exist or is unavailable;'visible'

(This gave after i close the QTP manually. )

Thanks
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Check into processes at Windows task manager on your system.
there must be a process running as QTAutomation agent.
end the process and it should work.

Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi

Thanks Saket , It works now.
Reply
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
Option Explicit
''**********************************************************************
Code:
'Script Name: DriverScript
'Author:  
'Date of Design: 12-Apr-2013
'Date of last Revision: 12-Apr-2013
'Functions Called:
'Description:  'This Script performs:-
     '1.Logging into the application
                '2.Closing Excel spreadsheets which are open
                '3.Importing the TestCase spreadsheet
                '4.Executing the Test Case by calling the corresponding actions
'******************************************************************

Code:
SystemUtil.CloseProcessByName("IExplore.EXE")
SystemUtil.CloseProcessByName("EXCEL.exe")

'***** Opening and retriving data from excel file
Dim objExcel
Dim intCntrl
Dim strRun
Dim strStatus
Dim objworkbook
Dim objExcelSheet
Dim introwCount
Dim intcolCount
Dim intcounter

Set objExcel=CreateObject("Excel.Application")

Set objworkbook=objExcel.workbooks.open("D:\AutomationTesting\TestData\TestData.xls")

Set objExcelSheet=objworkbook.worksheets("Run Sheet")

introwCount=objExcelSheet.usedrange.rows.count

intcolCount=objExcelSheet.usedrange.columns.count

For intcounter=2 to introwCount-1

intCntrl=objExcelSheet.cells(intcounter,1)

strRun=objExcelSheet.cells(intcounter,2)

strStatus=objExcelSheet.cells(intcounter,3)

                If strRun ="Yes" then  

                     RunAction "Action1 ["&intCntrl&"]", oneIteration

                     Wait(20)

                    objExcel.objworkbook("TestData").Activate
                  
                    objExcelSheet.cells(intcounter,3).Value = "Executed"

                  End If

objExcel.DisplayAlerts = False

Next

'Set objExcelSheet = Nothing

objExcel.DisplayAlerts = False

objExcel.Save

objworkbook.Save

objExcel.DisplayAlerts = True

objExcel.Quit

Set objExcel = Nothing


after completion of this execution it has to update the "Executed" in the test data excel sheet but here I am getting the error msg as

"The remote server machine does not exist or is unavailable: 'objworkbook'
Line (53): "objExcel.objworkbook("TestData").Activate "

The remote server machine does not exist or is unavailable: 'cells'
Line (55): "objExcelSheet.cells(intcounter,3).Value = "Executed"".

Kindly look into this and do the needful

Regards,

Sreekanth
Reply
#5
Solved: 11 Years, 3 Months, 4 Weeks ago
The excell object which you have defined gets set to nothing when the focus of script goes to the run the required script.It better you open the new instance of the excel again and write your result in that.
Reply
#6
Solved: 11 Years, 3 Months, 4 Weeks ago
@sreekanth.peetla, Please open a new thread for the new query.

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  General run error when Exist fails msacks 1 1,866 02-08-2019, 02:12 AM
Last Post: Ankur
  Need script to connect remote machine stalinvanama 1 1,672 09-27-2018, 08:12 PM
Last Post: stalinvanama
  [UFT 12.52/VBScript] Test object exist, is visible and enabled before take an action sparkwanted 0 3,654 02-07-2017, 12:28 AM
Last Post: sparkwanted
  how to find Excel file exist or not in vbscript code sree.85 3 11,261 08-22-2013, 11:42 AM
Last Post: akhandesh
  executing qtp on a remote machine sujaravi123 4 4,952 08-02-2013, 01:22 PM
Last Post: sujaravi123

Forum Jump:


Users browsing this thread: 1 Guest(s)