WinAppDriver: Unable to connect to the remote server in Local Session - vb.net

I am attempting to use WinAppDriver to test a classic Windows form control application on a local PC. This test is to run all on the same PC executing the code, not remotely.
However, when attempting to launch the application with WinAppDriver, the following ex occurs:
Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
I found where, for WinAppDriver, that Windows must be set to "Developer Mode", and I already have that turned on.
Here's the code I have so far, just using the Notepad.exe example for now:
Dim appCapabilities As DesiredCapabilities = New DesiredCapabilities()
appCapabilities.SetCapability("app", "C:\Windows\System32\notepad.exe")
Dim NotepadSession As New WindowsDriver(Of WindowsElement)(New Uri("http://127.0.0.1:4723"), appCapabilities)
The ex is thrown on the third line.

WinAppDriver was not actually running at the time of executing this code. I was incorrectly assuming that it was already running.
Running it beforehand resolved the error completely, and Notepad launched.

Related

Excel automation through Windows Task Scheduler throwing an error - 80080005 Server execution failed

We have a console application to automate the excel data refresh everyday at a particular time of the day. It is working fine when we switch off the office updates. But when an office update happens, immediately this stops working and throwing this error:
"exception Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))."
But when we try to execute the same console application through command prompt, it is working fine and when the same is scheduled through SQL agent, then also it is working fine. Only the task that scheduled in the Task Scheduler is not working.
Workaround tried so far:
Set the Microsoft Excel Component's identity to "The Interactive user". This is working fine when a user is logged on to the server. So, this cannot be a permanent solution.
Tried to create the following folders in the windows directory.
"C:/Windows/System32/config/systemprofile/Desktop", "C:/Windows/SysWOW64/config/systemprofile/Desktop",
still it is not working.
I am using Microsoft Excel 2016 and the server is Windows Server 2016.
Any leads on this will be very helpful.

How to Automate the application which is accesible through remote desktop

I have a requirement to automate one of my application which is accessible only through Remote desktop connection.
I normally connect to the application using following steps
1) Navigate to remote desktop connection and enter Ip address
2) Enter Server User id ,password
3) Then open application using browser.
Please help with the steps.
You can break your problems in 2steps :
1. Login to the box via java code (or any other preferable language, you are comfortable).
Remote Desktop Connection
JAVA
// creating credentials
Process p = Runtime.getRuntime().exec("cmdkey /generic:"+ip+" /user:"+userName+" /pass:"+password );
p.destroy();
Runtime.getRuntime().exec("mstsc /v: "+ip+" /f /console");
Thread.sleep(2*60*1000); // min sec millisec
// deleting credentials
Process p1 = Runtime.getRuntime().exec("cmdkey /delete:"+ip);
p1.destroy();
Once you able to login to the box, it is as simple as launching the browser, opening the application and running your scripts(these scripts should be present on your remote desktop where you want to run your scripts). This is pretty straight forward.

Microsoft Test Manager cannot install test agent on these machines

I am trying to create a new environment using microsoft test manager. Unfortuntely I get the following error:
Microsoft Test Manager cannot install test agent on these machines. Possible causes:
- Machines are not running or they are not available on the network
- The File and Printer Sharing exception is not enabled on the machines.
Controller is up and running , the user and password is correct. Firewall is disabled. File and Printer sharing exception too.
I do not know what is going on. How could it be solved? Do not know how to go further with this.
Try running MTM as Administrator. Also check the article on MSDN
https://social.msdn.microsoft.com/Forums/vstudio/en-US/a790f8d3-489d-4fd6-9204-2fb1f7e21b50/microsoft-test-manager-cannot-install-test-agent-on-these-machines?forum=vsmantest&tduid=(bbfad4796548274f6ccbc9c1b7d15461)(256380)(2459594)(XdSn0e3h3.k-lkj0MqSQojhOnvvQ2ym5yA)()

Websphre portal does not startup

When I try to start up a websphere portal server, it hangs at the line :
Server WebSphere_Portal open for e-business
and although it means that the server started up successfully, it is not...because in the progress bar, i stll see 'Starting.....' I have tried deleting the wstemp and temp directories but beyond that I am not sure what I can do to debug the problem.
The server with the same profile starts up great from another workspace, but when I come to this workspace, it just hangs at
Server WebSphere_Portal open for e-business
I am using RAD 7 and portal 6.1
Kaushik,
Try and change the connection type between RAD and WebSphere Portal.Switch it between SOAP and RMI and see if that makes a difference.
Double click the server and in the property editor you can specify the connection method.
Check this link out
http://www-01.ibm.com/support/docview.wss?uid=swg21207553
HTH
Manglu

Remotely control a graphical vb.net program through a command prompt

I have created a VB.NET program using windows forms. The program runs on a remote PC and displays information on a screen. The computer does not even have a mouse or keyboard connected to it. The program shows the information based on the file that is loaded.
I want to be able to change this file remotely to another file that is already on the remote PC. I can't use a graphical remote desktop client as we have very limited bandwidth.
So, my idea is to change the file using the command prompt (I think I'll need something like SSH). I'm not sure how to do this. Should I use something like this and load DosModule first:
Module DOSModule
Public Sub Main()
Console.Write("First, start with Command Prompt processing ...")
Dim myWinForm As New WinForm
Application.Run(myWinForm)
End Sub
End Module
How would I then read commands that is send to the program? I also only want one instance of the program running.
Thanks
You have 2 options. The first is a custom program that WILL require some network programming, like it or not. I would suggest creating either a Command-Line batch file or else a PowerShell script, then creating a program to transfer the script to the remote computer and execute the script.
The second option and the one better suited for you would be to download an SSH server. An SSH server will essentially open a command window and pipe the input and output over to a telnet client running on your machine. If you are running a version of Windows Server, an SSH server comes with Windows Server. Otherwise, you can download one for free here: http://www.freesshd.com/
Once you install the SSH server, you simply use telnet, from a command prompt, to link up with your remote SSH server