Micro Focus QTP (UFT) Forums
Remote server machine does not exist - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Remote server machine does not exist (/Thread-Remote-server-machine-does-not-exist)



Remote server machine does not exist - eroshan - 10-14-2009

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


RE: Remote server machine does not exist - Saket - 10-14-2009

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.


RE: Remote server machine does not exist - eroshan - 10-14-2009

Hi

Thanks Saket , It works now.


RE: Remote server machine does not exist - sreekanth.peetla - 05-03-2013

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


RE: Remote server machine does not exist - agarwl.anurag - 05-03-2013

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.


RE: Remote server machine does not exist - Saket - 05-06-2013

@sreekanth.peetla, Please open a new thread for the new query.