how to open browser in remote desktop

723 views
Skip to first unread message

Lucky 624

unread,
Sep 25, 2016, 3:40:02 AM9/25/16
to Selenium Users
 Hi All,

Greeting!!

I want to automate web application on remote desktop. I am able to login on remote machine, but dont know how to open IE browser in remote machine.. 
Robot robot=new Robot();
Runtime.getRuntime().exec("C:\\Windows\\system32\\mstsc.exe");
Thread.sleep(2000);
Runtime.getRuntime().exec("C:\\Users\\lakhwinder_singh\\Desktop\\AutoIt\\RemoteHandle.exe"); ( For entering machine name)
Thread.sleep(2000);
Runtime.getRuntime().exec("C:\\Users\\lakhwinder_singh\\Desktop\\AutoIt\\demoa.exe");  (for handling authentication

 with above code I am able to login on remote machine .Kindly suggest me to open IE browser in remote machine.
thanks,
Lucky

Akuffo, Kwame

unread,
Sep 25, 2016, 6:24:31 AM9/25/16
to seleniu...@googlegroups.com
Hi,

Package your tests as a jar file, and execute the jar on the remote machine.


Many thanks


 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/18ef3cf9-3b53-4d33-819a-d015c5a619ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



David

unread,
Sep 25, 2016, 6:49:40 PM9/25/16
to Selenium Users
To elaborate on Kwame's reply, there are 2 options:
  • Store the tests on the remote machine and run them locally on the remote machine, but trigger the execution remotely. You only package tests as JAR if tests are in Java, otherwise, you package it however you package/deploy tests in one's given language. To use this approach, you transfer over your tests onto the remote machine, then create a launcher script on that remote machine that can execute the tests locally by running script (e.g. batch file on Windows with command line command to execute JUnit/TestNG tests), then on the remote machine you normally run tests from (this would be your "local" machine), you call the launcher script on the target remote machine - you can do this with tools like PSExec.exe and batch file on Windows or using VBScript with WMI or Powershell scripting. This is similar to doing something like "login to remote desktop, run batch file on remote desktop, batch file starts local tests on the remote desktop). As such the tests run locally on the remote machine, so your test code simply uses "driver = new InternetExplorerDriver();" for the driver instance (in Java).

  • Use RemoteWebDriver and run an instance of Selenium server on the remote machine. You can then set your tests on (local machine) to use RemoteWebDriver() instead of InternetExplorerDriver() or other browser driver, connecting to desired browser instead via DesiredCapabilities that you pass to RemoteWebDriver. With this approach, you can choose to run Selenium server on remote machine in standalone mode or you can choose to have it deployed with Selenium grid (with a grid hub & node) - that's up to you.
In both cases, you'll want the remote desktop session open (or don't use remote desktop but keep the local desktop on that remote machine logged in and unlocked). Otherwise, you may run into issues with IE browser automation not running correctly if that desktop is locked.

On Sunday, September 25, 2016 at 3:24:31 AM UTC-7, Kwame Akuffo wrote:
Hi,

Package your tests as a jar file, and execute the jar on the remote machine.


Many thanks


 
On 24 September 2016 at 16:08, Lucky 624 <lakhwind...@gmail.com> wrote:
 Hi All,

Greeting!!

I want to automate web application on remote desktop. I am able to login on remote machine, but dont know how to open IE browser in remote machine.. 
Robot robot=new Robot();
Runtime.getRuntime().exec("C:\\Windows\\system32\\mstsc.exe");
Thread.sleep(2000);
Runtime.getRuntime().exec("C:\\Users\\lakhwinder_singh\\Desktop\\AutoIt\\RemoteHandle.exe"); ( For entering machine name)
Thread.sleep(2000);
Runtime.getRuntime().exec("C:\\Users\\lakhwinder_singh\\Desktop\\AutoIt\\demoa.exe");  (for handling authentication

 with above code I am able to login on remote machine .Kindly suggest me to open IE browser in remote machine.
thanks,
Lucky

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages