Can't connect to selenium grid on VM? - selenium

I have a VM on the same network as my computer. I can remote into the VM and open up the selenium grid console (http://(ip):4444/grid/console) and it appears to be working fine.
When I try to open that same address from my own machine or any other machine on the network, I can't see it (I get a "webpage is unavailable"). I turned off all firewalls on my machine and the VM, and it didn't do anything.
Anyone run into this problem? Any suggestions?

Related

Hugo webserver not reaching my Windows vm

I want to test my website on edge and internet explorer so I tried using a windows VM, I am currently on linux mint 19.1, I start the gohugo server with "hugo server --disableFastRender" and create the VM in virtualbox using bridged adapter but I cant load localhost:1313 on the vm.
I tried using NAT and port forwarding but I have the same results, also tried the conection between the host and VM using ping and the VM can reach the host but the host cant connect to the VM so I guess that the problem is there but I dont know what to do now. The place where I am working uses IPv6 and I never worked with it before so maybe it has something to do with that
Start your site as usual with hugo server, which makes it available at http://localhost:1313
Leave your Windows VM network settings at their defaults
In your Windows VM, navigate to http://10.0.2.2:1313 to hit your hugo site
In a nutshell, 10.0.2.2 on your Windows VM (its default gateway) is equivalent to localhost on your linux host.
You can get the default gateway of your Windows VM by running ipconfig in Command Prompt.

Selenium chrome remote web driver deosn't work on vpn

I'm using Selenium remote web driver for gui testing. The server is on Linux, the browser is on Windows. Everything works fine when I'm using a 'regular' connection. The first issue is that when I switch from cable to wifi, I have to restart the computer for the remote webdriver to work. But the main problem, is that when connecting to vpn, nothing works at all - the browser won't even open. Has anyone encountered anything like this in the past?
Let me know if more details are required..
Thanks :)
Chrome doesn't allow extensions while running /controlled by selenium. I end up using VPN application(hide me,norvpn) which globally change ip for the running applications on my machine.

How can I run Selenium tests when my site is in Vagrant?

I use Vagrant for my local development. Now I want to use Selenium for automated browser testing. When I setup Selenium in my VM, it works like a charm (great stuff by the way).
But now I want to move the Selenium testing out of the box. I tried to run the Java server on my host machine, forward port 4444 to port 4444 in virtualbox, and then fire the phpunit-command in VirtualBox, hoping to trigger the server on my host machine.
But instead I get a CURL-message that phpunit can't connect to 127.0.0.1:4444, so obviously there is no connection to my host machine on this port.
Can anyone tell me what I'm doing wrong?
Edit: I figured out that when I'm running the server on the host, I cannot access 127.0.0.1:4444 in my browser, however, I am able to access localhost:4444. Which is weird, because my hosts-file has the correct line (although it shouldn't matter since phpunit is trying to access a numeric address).
I think the best solution for this is to setup a "private network" this way you'll be able to use internal address to access your vm and host separately...
Depending of your vm provider different solution are possible (for example, Virtualbox support internal netowrk only)
Have a look at : http://docs.vagrantup.com/v2/networking/private_network.html

MouseClick() on a locked VM

I am aware that autoit MouseClick() would not work when the system is locked.
My Question is ::
I have VsphereClient installed on my machine and i access VMs using this client. Now if autoit script is running on VM and i lock my pc (VM is not locked), then will the mouse interaction functions work on the VM?
VM is not located on my local pc. It is located on an ESX server.
So if the VM is not in locked mode and my pc is in locked mode, will the mouseclick() of AutoIT work on the VM?
vSphere is purely a configuration utility. It is not required for the virtual machines to run in anyway.
Therefore... If you have a script on your VM and that VM is not locked it would work exactly the same if you had it on a PC.
Don't make the mistake that vSphere is require for the machines on ESXi hypervisor to run.
Hope this helps :)
If your VM is not locked and Autoit is running on your VM, the MouseClick() will work perfectly as it will only occurs on your VM independently of your current local pc state. In fact you must see your VM as another PC and since it's running and not locked you can do everything you want, in your case an autoit script.

VirtualBox, Remote Desktop, and VPN

Networking is not a strong skill set of mine and I'm new to VirtualBox..so here we go -
I've got a Windows (XP) VM running on VirtualBox. I am able to use remote desktop to connect to the VM with no problems.
The Problem: I need to connect to another network via VPN on the virtual machine. However, once connected, all local network resources become unavailable. As a result, my remote desktop session is disconnected.
Question: Is there another way to remotely access the VM? Is there some way that VirtualBox can route me to the VM without using the Windows RDC functionality so that I can have an active VPN connection but still control the VM remotely.
Should have done some more research. This feature is already built into VirtualBox. You can log into the VM through the host machine.
All you have to do is turn on remote display in the settings for the VM and choose the port that you want to use (make sure to make appropriate firewall changes). Then you remote to that port on the host machine.
Ex: Host machine has an IP of 192.168.1.200 and you set up port 3395 for the remote display - you would open Remote Desktop Connection and use 192.168.1.200:3395 and it would open the VM.
More detail from the VirtualBox site.
http://www.virtualbox.org/manual/ch07.html