I want to use Robot Framework ScreenCapLibrary to record a video on the remote machine.
I use Selenium Grid to execute a Robot Script.
For example:
Open Browser url=about:blank browser=chrome remote_url=<url_selenium_grid>
Start Video Recording #How do I record the video on the remote machine?
Thanks
Related
Here I have a scenario where I need to upload a file by clicking on the upload button on the UI application. I have tried using the driver.inputFile but, it is not working for this kind of button. So, I have used the karate robot functionalities as mentioned in How can I upload a PDF file using Karate UI Automation? and, it has worked fine in my Local machine. But when I tried to implement the same functionality on the VDI robot framework has failed abruptly. I know it can be done by "multipart file" Since it is UI automation, I need to be accurate on that upload functionality using the user interface.
Any help would be appreciated and that will save my day.
Thank you.
Usually I make use of AutoITscript to upload a file in the Windows dialog box. This is useful while testing on Local Machines on any browsers. But,since I have now moved to use BrowserStack to tun my tests on cloud, I am finding it difficult to run the AutoIT script on the remote browser. Any help in this regards is much appreciated.
Thanks!
Note :I cannot directly enter the file path in the web UI as its disabled and the only way is to open the Windows dialog and browse to the actual path,which I used to do using the AutoIT script.
How do I use Robot Framework Selenium to control a regular browser that I can see, and that doesn't exit after finishing a test?
You can't. You cannot get a handle on an already open browser. You can, however, open your browser with the test and then not close it. The browser will remain open for you to interact with it.
If you absolutely must have this functionality, you could try using the remote library interface. The remote library could act as a proxy to the selenium keywords. It could open a browser and keep it open for as long as the remote library server is running. My guess is that this would take a lot of work, and I don't see any real benefit in doing it.
I am bit confused here..
"selenium-server-standalone" jar contains all the library files to run script then why do we need to use "selenium-java" jars?
I read somewhere that its used for Language Binding.. if it is true, then please help me to understand the meaning of Language binding as well.
Thanks.
In the previous version of Selenium, which is Selenium RC (Remote Control), it is mandatory that you need to run selenium-server-standalone.jar jar file, which acts like a server. Selenium RC will then use this server to establish a communication channel between browser and the code. Also, this jar file contains all the library functions to be used in our code.
But in later version of Selenium, which is Selenium WebDriver, there is no need to run this jar file, as the WebDriver api will directly communicate with the browser's native language. So, this jar file is replaced with selenium-java.jar jar files
Hope this helps.
It is mainly use in the Selenium Grid. As we use different OS and browsers with different machines, we need to run it same time for various reason. In selenium Grid, we use the machine Hub and Node(You can go through selenium grid docs for more), so for running the selenium in different machines with the main machine, we need server standalone.
WebDriver and the Selenium-Server
You may, or may not, need the Selenium Server, depending on how you intend to use Selenium-WebDriver. If your browser and tests will all run on the same machine, and your tests only use the WebDriver API, then you do not need to run the Selenium-Server; WebDriver will run the browser directly.
There are some reasons though to use the Selenium-Server with Selenium-WebDriver.
You are using Selenium-Grid to distribute your tests over multiple machines or virtual machines (VMs).
You want to connect to a remote machine that has a particular browser version that is not on your current machine.
You are not using the Java bindings (i.e. Python, C#, or Ruby) and would like to use HtmlUnit Driver
http://www.seleniumhq.org/docs/03_webdriver.jsp#how-does-webdriver-drive-the-browser-compared-to-selenium-rc
I am working with Selenium 2 WebDriver. Instead of UnitTest project, i initiate it from website because of following reasons:
It should automatically run every 24 hours. I have written some scheduling code using System.Threading.
Provide some UI to customer to run it intermediately when they require.
At every run an email would be sent as a part of test result.
My target site is: http://www.vroomvroomvroom.com.au
I have created a Class which has all the Selenium Code. I call that Class using System.Threading upon page load of default.aspx.
It works fine when i run default.aspx from visual studio by pressing F5 OR Ctrl+F5 i.e. with Visual Studio development server e.g. http://localhost:3251/default.aspx.
But, when i try to run it directly from IIS, with default port (80) e.g. http://localhost/seleniumTest/default.aspx, then it fails with following observation/error:
It runs the Selenium code to an extend, but doesn't show the broswer.
It fails after some steps with No response from server for url http://localhost:7094/hub/session/4bbe4b0c-aeee-4fa3-8bc0-aae47c6869af/element
It is possible what i am trying to achieve.
FYI: Let me know if further details are required.
I have managed to find the solution myself.
Basically, RemoteWebDriver has to be used instead of FirefoxDriver.
Steps:
Change the initialization of FirefoxDriver to RemoteWebDriver as:
Change from
IWebDriver driver = new FirefoxDriver();
To
DesiredCapabilities capability = DesiredCapabilities.Firefox();
Uri url = new Uri("http://REMOTE_IP:4545/wd/hub");
IWebDriver driver = new RemoteWebDriver(url, capability);
2. Download Selenium Standalone server and initiate it via command prompt using ~
java -jar E:\Software\selenium-server-standalone-2.24.1.jar -interactive -port 4545
This approach has 2 benefits:
One could use the local IIS for running the test.
Test could be run remotely. Refer Selenium RC documentation. One could see the screenshots remotely using
REMOTE_IP:4545/wd/hub/static/resource/hub.html
I am thinking to modify the code of hub.html and client.js file used within it to provide a better Remote feel.
I hope this can be useful for others as well.
FYI:
IP address REMOTE_IP could be changed to any realtime IP address OR localhost. Use the above mentioned port while initiating the page request.
Start/Stop code of Standalone Server could be fitted inside the test, so that it is automatically started/stopped via batch file.
Keep the server running by not closing the command prompt.