The Chrome Headless browser was unable to identify the element even it is mentioned with an id in the test case. While running the same test case in chrome browser,
it was working perfectly fine and was failing when I try to run the test case using Chrome Headless Browser. I have set the window size for the chrome headless Browser even the results were same.
Unable to find the element located by ‘By.xpath: //input[#id =
‘tipo_meta-display_name’]’. Please recheck the objects properties to
make sure the desired element is located.
Can anyone help me with the issue
Related
When new chrome headless mode is used the "--windows-size=width,height" argument doesn't work.
For example:
"--headless=new",
"--window-size=1920,1080"
Running tests with these arguments produces strange size screenshots: 1028x653 px
But with the old headless mode:
"--headless",
"--window-size=1920,1080"
the screenshots size is OK: 1920x1080 px.
I can't use old mode, because the files downloading is not working in it anymore, here is the post about it, where using the new headless mode is suggest as a solution: Downloading with chrome headless and selenium
Are you running your tests with a CI-Tool like Jenkins?
I see a similar behavior (messing up the screen size) only with a central run on Jenkins, like always..local it works.
If so I think it has to do with the system user the test is executed through a jenkins agent.
This is a bug being fixed in Chrome. You can see the status of the fix and the reasons here:
https://bugs.chromium.org/p/chromium/issues/detail?id=1416398
I have automated ui-tests that test a web application in chrome using https://theintern.io/
The application offers a barcode scanner using the device camera (https://github.com/zxing/zxing).
To test this feature, a fake barcode is shown to the application, this has worked until chrome version 90/91 (not quite sure anymore).
Since this version I can not access the fake video anymore.
Chrome-options I have set:
use-fake-device-for-media-stream
use-fake-ui-for-media-stream
`use-file-for-fake-video-capture=${fakeVideoFilePath}`
I can reproduce this outside of the application if I use the chrome window configured with selenium and go to
https://webcamtests.com/
This loads forever - same thing happens inside the application.
The webcam name is the path to the video the camera is supposed to show.
Any hints on what is causing this problem or how it can be solved?
Thanks!
Fixed with Chrome 93.
After the update it is just working again.
The same application that I am developing works fine on Firefox but not on Chrome.
My application a day ago printed some things on the console, but I removed them today, which means that the actualized version of the application does not print anything on the console.
On Firefox it works, everything renders and there is not prints on the console.
However on Chrome, the app still prints on the console. It means that it is retaining some old state for some reason.
Does that even make sense? The code is already gone (erased), so the only way Chrome is printing the old state on the console is if he is storing it.
On Chrome I also get errors of undefined functions, but they are defined. On Firefox that does not happen.
Have you tried reloading the page? Another thing to try to really get rid of the state that the browser is obviously holding onto is to clear the browser cache.
I am developing coded ui tests(Using VS2012 Premium, Update 4) for my application. I have initially recorded my tests using IE8 and it works fine in in IE8. But When I try to run these tests in Chrome, the browser window automatically closes after the first test run and rest of the test fails. I am using the following code to launch chrome browser window
BrowserWindow.CurrentBrowser = "Chrome";
BrowserWindow window = BrowserWindow.Launch(new Uri(url));
window.CloseOnPlaybackCleanup = false;
The same test methods run in IE8 without any error, but in Chrome the browser window closes automatically. If I run a single method it runs and closes window after the test run. I have verified other threads also, but nothing helped me to solve the issue.
I have already downloaded the selenium components required. Please let me know if anyone has faced this issue
I have tried to put the code in TestInitialize method but the result is same. Then I tried launching the browser using the Procees.Start method. This launches the browser but Coded UI is not able to find the browser window and it fails.
The solution that refers to my blogpost will not work. This is a known limitation of codedUI cross browser functionality. Reuse of browser window cross test methods is only supported on IE
It is documented here:Introducing cross browser testing
hope this helps,
Marcel
I've tried everything. I've tried ctrl-shift-R. I've tried ctrl-F5. I've checked the Disable Cache box in the developer tools. I've completely cleared my browser cache. But I cannot for the life of me get Chrome (Version 24.0.1312.57 m for Windows 7 - the most up-to-date version) to reload a specific piece of inline javascript (meaning it's in my html page, not in a separate js file.)
Is there any other way I'm missing to get this done, or do I need to completely uninstall Chrome and reload? Please don't tell me to use Firefox instead; the code works in javascript but doesn't in Chrome, and I need to be able to test it there.