When executing a test I also want to register on witch environment the test was run.
So I need the Computername of my machie.
Is there a possibility to retrevie this value in VB.
I already tried a default solutions as:
Declare Function GetComputerNameA Lib "kernel32" (ByVal lpBuffer As String, nSize As Long) As LongPublic Function GetComputerName() As StringDim sResult As String * 255 GetComputerNameA sResult, 255 GetComputerName = Left$(sResult, InStr(sResult, Chr$(0)) - 1)End Function
But I cannot Declare Functions in TestComplete.
Is there another way to retrieve this kind of System variables
Go to Solution.
You can use HostName property, more about it: https://support.smartbear.com/viewarticle/68025/
View solution in original post
Sys.HostName contains the computer name.
Life can be so Simple sometimes, given solutions work perfect
Thank you both