I am testing a website via selenium chrome stand-alone docker, running on aws ec2 ubunto, and performing drag and drop of an image. All work right except that the image is not dropped at the target (I examine it with a screenshot).
When I try it from my local machine it works fine (even in headless mode, which s the mode I use in the cloud).
I also tried seletools solution - same thing.
Any ideas?
Tnx
Tried on a local windows machine and it worked as expected. In the cloud I also didnt see any errors. Just the image not dropping at target
Related
I am trying to run some automation which uses Selenium 4 on Azure Virtual Desktop. As always with development - "it runs fine on my development machine" but on AVD the msedgedriver.exe launches a console window and states that "Microsoft Edge WebDriver was started successfully". However, then nothing happens, Edge browser does not launch and eventually my app times out and fails.
I absolutely have the right version of the webdriver which matches my version of the Edge browser.
I have tried adding the following arguments to my C# code: verbose, log-path=... but neither seems to make any difference.
Any suggestions on how I can increase diagnostics or what the issue might be?
OK, so I've gotten acquainted with Neptune notebooks (a fork of Pluto notebooks) and they work fine on my machine, even on the FF browser (my default browser right now).
However, as the printing capabilities of these notebooks aren't quite there yet, I need to open a notebook on Chrome (or its open-source version, Chromium). When I try to do that, I get an authentication error (something about a "secret" that it needs, though it's quite vague as to what that is and where it would be inputted on the browser). I have full access privileges to all the folders involved, on my Linux Mint machine, running one of the latest versions of Julia.
Is there a way to do that, without having to make that my default browser?
Thanks
Just use the option launch_browser=false when starting Neptune.
julia> Neptune.run(;launch_browser=false)
Go to http://localhost:1234/?secret=xs5m1mnx in your browser to start writing ~ have fun!
Press Ctrl+C in this terminal to stop Neptune
Now copy the link that you see in console (http://localhost:1234/?secret=xs5m1mnx in my case) to Chromium and have fun!
I'm using robotframework with selenium and firefox.
I'm running test in a docker.
But for debugging purpose I want to see sometimes what's happen on the UI.
So is there a way to get the UI of firefox launch when test are running in docker.
thanks
You can use VNC to see what is actually happening over docker. It's like remote access where you can see everything on docker image
Download VNC viewer :
https://www.realvnc.com/en/connect/download/viewer/
Some tutorial :
Click Here
Article
https://medium.com/#shivam.somani09/running-automated-test-cases-on-vnc-viewer-using-docker-16656c3d1d87
OR if you don't want VNC
You can take screenshot if you just want an image on a particular place.
You can also use driver.getPageSource(); to get the HTML code
I have a Java Application, which controls an automated GUI test in a FF-Browser via Selenium WebDriver Libraray. The Java App reads test cases from a database and executes them according to the code logic.
For instance, if the app reads in a Field, it'll search it by using the "findElement"-method from the Selenium framework. I do not use any test scripts for Selenium.
Currently this is happening on a local workingstation of an employee.
Now I want to move this whole environment into a Docker container.
Is it even possible to instantiate a Firefox Browser in a Container?
btw: I do not need to see the actual GUI of my browser.
And secondly:
There are several containers with selenium on dockerhub ready to use, but these do not fit my surroundings am I right?
As far as I know the SeleniumGrid expects testscripts and cannot be executed through runtime.
I open up a Linux VM (Debian:Jessie distribution) with Vagrant, in which then runs Docker.
I am still a beginner with Docker.
I couldn't find any question around here regarding my purpose.
Thanks in advance!
Is it even possible to instantiate a Firefox Browser in a Container?
Yes. The simplest way to do this is would be using the selenium images on Docker Hub.
There are several containers with selenium on dockerhub ready to use, but these do not fit my surroundings am I right?
If you think the Selenium images don't work for you because they are all based on Selenium Grid, you can use the StandaloneFirefox and StandaloneChrome images instead. These are individual instances, they do not use Selenium Grid.
BTW, the non-Debug Selenium images do not have a GUI. You mentioned you didn't need to see the browsers running so these should be fine. If you do need to see the browsers, the Debug images have a VNC server installed so you can run the image, connect with a VNC client, and watch the browsers run the tests.
I have developed a framework with selenium + .NET
I'm running all test using Bambo agent. Everything is working fine, except one thing.
As you know, chromedrive can not set window size bigger than actual machine screen resolution.
My bamboo machine has set 1920x1080 resolution. To make sure that it is for real 1920x1080, I wrote a powershell script that is executed on agent berofe tests and print out resolution. Btw I have bamboo agent with Windows
But when webdriver start browser (chrome, firefox or IE) it limits the browser window size to 1044x788. Looks like the webdriver is getting wrong resolution from bamboo agent.
As you know webdriver is not allowing to set bigger size of window than you actual machine has. Thats why we limit browser size to 1044x788
There is no way to change size of window for bigger one. Things like: Manage().Window.Maximize() or Manage().Window.Size = new Size (1920x1080) or starting chrome with webdriver adding some options for chrome like: chromeOptions.AddArgument("--window-size=1920,1080"); it is always limited to 1044x788.
Did any one have similiar problem? Can I somehow "hack" webdriver to open browser with 1920x1080? Meaby somebody knows how webdriver is checking the screen resolution? If he is looking for resolution in some windows file then meaby I could inject 1920x1080 resolution there?
Or meaby there is some setting in bamboo agent that I missed?
Why is that important? Becouse at same point I faced problem that on this smaller browser some webelements sometimes are overlaping (figure out that on screenshots) and it case some test to fail.
When I run test on my laptop it always have this 1920x1080 resolution.
P.S. I know about Selenium Grid but my aproach works great for me, until now :)
Before second I wrote another powershell script and create a screenshot on bamboo machine, and the screenshot has 1024x768 resolution. So meaby it is coused somehow by machine..
I know the answer. Bamboo runs all tasks as windows service (not as a user). That's why I was not able to see the browser and the screen resolution was wrong. There are two solutions:
Set up selenium grid hub and node on that one machine with your user, and paste url of hub in you framework. Then bamboo service will trigger selenium grid hub that is set by your 'user' and you will be able so see browser when you will log into the virtual machine and it wil have normal resolution (I have select this solution)
I think that there could be another solution to set up bamboo to run tasks not as windows service but as a user (not sure if it is possible).