Forum Discussion

tvklovesu's avatar
tvklovesu
Frequent Contributor
2 years ago

My local folder is opened when running scripts on VM

Hello, so far I was able to do web application and now I have a testcase where I need to open a folder and click on a file to open it. When I run the script in local its working fine but when I run in headless mode in vm server till the step where opening the folder works fine but while opening the folder it opened again in my local system. 

I tried looking in to where to change the user type but still not able to run

here are some screenshots

 

 

 

  • Put a log message in before the folder is opened to see what TC thinks the path name is. It may be something other than the user name.

  • The screenshots you sent are from the Name Mapping, but the article is talking about settings in Tested Apps and the parameters in that screen. That is where you need to look at the path.

    • tvklovesu's avatar
      tvklovesu
      Frequent Contributor

      Sorry I thought I shared this image. This is the place where it says to provide the variables right? but even if I select %UserProfile% from the list it still takes my userprofile instead of the system where its running

       

       

    • tvklovesu's avatar
      tvklovesu
      Frequent Contributor

      Thanks Marsha_R, I was able to get the Path of that remote machine. But it seems that the remote machine doesn't have userProfile in the environment variables. How can I add the userProfile variable at run time on remote machine?

       

      Path from remote machine

      C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\CCM\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files (x86)\Java\jre1.8.0_351\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Adaptiva\AdaptivaClient\bin\x32;C:\Program Files (x86)\Adaptiva\AdaptivaClient\bin\x64

  • There is a Set Path command that works to do that but I would check to make sure that's permitted on your vm server. IT may have some restrictions on that.