How to launch the browser on client side using selenium webdriver - selenium

I am new to selenium. I am developed one application using a selenium web driver for doing some actions on the webpage. It's perfectly working when I am running locally i.e., it launches a browser in my machine. I deployed this application on a VM server so the script runs on the server(launched browser in VM Ware Machine), not on the client-side. Can anyone help me with how can I launch the browser on the client-side?

You have to create Hub and Nodes using selenium grid
You can refer this link to see step by step
http://www.seleniumeasy.com/selenium-tutorials/how-to-configure-selenium-grid
Your server will be hub and your client machine will be node

If you trigger from one machine, you can launch a browser on another machine using the selenium-grid concept
But both machines are under the same LAN.
Here you want to execute on the client machine. It is not possible, because your machine and client machine won't be under the same network

Related

Robot Framework executing test on RDP client

I have my robotframework setup on my PC.
I would like to connect to a remote windows client, have it open a browser and access a URL.
Verify that the pages has loaded.
Pretty basic but since I am new to RF, I wanted to know how that would work.
For Linux machines, I would use the SSHLibrary and just execute commands (wget) but for the windows machine, I need to use the browsers.
Do I need RF installed on the destination client RDP?
Do I need the webdrivers for each browser on the client RDP?
How would I go about logging in the Windows machine through RDP?
After Logging in with RDP, I run the same "open broswer" with broswer and URL?
Thanks!!!
The use case you describe - a browser to be opened & controlled on a remote machine, is precisely what Selenium solves.
Though in day-to-day work or debugging we are usually starting a local browser, SE is preliminary designed for remote execution. So head to www.selenium.dev, and focus on the Grid - that's the component you are after.
I'm that approach, answers to your specific questions:
no, you need Robot Framework and selenium library on the local machine, and only selenium & webdriver on the remote.
you don't need the drivers on the client - the selenium library is all you communicate with in your code; you need them installed in the remote only.
on the local you will get the logs of the webdriver commands execution; actual browser manipulation logs are only on the remote and the hub (but these are really debugging ones, everything high-level for the functional execution is local).
you don't really log into RDP with this approach (RDP is totally out of the picture here), and yes - your code is the same as running on local browser - Open Browser, Get Text, etc - but, executed on a remote machine.
If you want to see why 1) and 2), head to the answer over here (shameless plug 🙂)

Integrated Windows Authentication (IWA) issue on Jenkins slave node in Selenium tests

Given: We have a Jenkins build running Selenium tests for application using using SSO authentication.Application and authentication provider are located in corporate intranet of type
"auth-service-name.corp-name.com". Tests are running fine on local Windows machine, but on Jenkins windows environment they can't pass IWA to access the tested website. Application tested works ONLY in Chrome, so it is the browser used in tests. In registries of Jenkins machine it was found out that there is a proxy set up, while on local machine there is no proxy.
Tried: sending http requests with login and pass for sso-provider page. starting chrome in jenkins via command line with(start chrome --auth-server-whitelist=
"*corp-name.com")
Question: Is there any way to bypass such an issue? What could cause that Jenkins machine can't pass IWA?

Jenkins, running selenium tests on local dev machine

I have a Jenkins server running in private cloud and the dev team want to be able to run some selenium tests on their local dev rigs.
I've looked at Selenium Grid and installed the Selenium Grid plugin for Jenkins and whilst I can get nodes to register to the Jenkins server (Selenium Hub) I cannot invoke tests on the node.
The local dev machines are on our corporate network behind a firewall with no option for that to be changed.
Does the Selenium Hub try to make a new connection to the node when it needs to, or does it/can it use the connection initiated by the node as some kind of reverse tunnel?

How to invoke test in remote machine using selenium JS Grid

I am new to Selenium and I am trying to execute test in remote machine using Selenium Grid and Javascript (in Node Js) I am now able to connect to remote machine from js.
In Java, we use RemoteWebDriver and give Node machine URL. there are plenty of examples in Google
how will we do the same from Javascript. can any one please provide me step by step procedure to Invoke Sample tests in Node Machine from Hub Machine.
Many thanks
Vijay Bhargav

Windows service that interacts with desktop screen resolution

I configured Jenkins as Selenium Grid and some Jenkins Nodes as Selenium Nodes (controlled by Jenkins Selenium plugin).
The nodes are connected with the option "Let Jenkins control this Windows Slave as Windows Service".
The service is defined automatically at the node as "interact with desktop".
Jenkins slave enables Selenium remote driver service
The problem is that the resolution of UI tests is really low (1036 x 780) where we need (1600x1200).
Opening an RDP session doesn't help since the service was started by Jenkins.
How to change the default resolution of windows service that can interact with Desktop?
I had the same problem as yours. Difference was I also have GUI automation besides Selenium tests. I ended up installing VNC service on all the nodes and wrote a script to change the desktop resolution before running any tests. However the highest resolution by doing that we got is 1280x1024, which resolved my problem.
If you don't mind giving up running Jenkins Slave as Windows Service you can use this way:
Jenkins on Windows and GUI Tests without RDC
Still - that would make you maintain an open RDP session that runs Jenkins JNLP process... So that solution is working, but not very optimal.