Phantomjs headless on linux: WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP - ruby

I am experiencing issue with Phantomjs headless automation testing on linux. We are using Jenkins as our CI server. However, we are getting the error below:
phantomjs://platform/console++.js:263 in error
[ERROR - 2016-12-09T19:45:12.372Z] WebElementLocator -
_handleLocateCommand - Element(s) NOT Found: GAVE UP.
Search Stop Time: 1481312712354
phantomjs://platform/console++.js:263 in error
How we start phantomjs:
phantomjs --webdriver=8001
Environment:
Phantomjs: 2.1.1
Jenkins: 1.598
Linux: Linux xxx1247 2.6.32-573.12.1.el6.x86_64
Ruby: 1.9.3
Cucumber: 2.1.4
Selenium-webdriver: 2.53
Please share your solution. Thanks!

There can be a few causes for this. One of them can be that the get action to the Web URL failed. That means you are operating on an empty result, which will throw that error.
Since the webpage is not fetched, the element will not be there.

Related

WebdriverIO: couldn't find executable for firefox browser using default runner (devtools:puppeteer)

I'm using webdriverIO for some automation testing and have recently migrated from 'selenium-standalone' service to default wdio devtools protocol.
wdio v.7.16.12
firefox v.95.0.2
From that point I can't start testing with firefox browser:
INFO #wdio/cli:launcher: Run onPrepare hook
INFO #wdio/cli:launcher: Run onWorkerStart hook
INFO #wdio/local-runner: Start worker 0-0 with arg: run,wdio.conf.js
INFO #wdio/local-runner: Run worker command: run
...
INFO devtools:puppeteer: Initiate new session using the DevTools protocol
ERROR #wdio/runner: Error: Couldn't find executable for browser
...
INFO #wdio/cli:launcher: Run onComplete hook
I've tried different combinations of options with 'wdio:devtoolsOptions' and 'moz:firefoxOptions'.
Plus checked whether could help dumpio: true, and 'moz:debuggerAddress': true options.
Also I've tried substitution browserName with product and adding binary and executablePath to capabilities.
When passing binary: 'path.to.firefox' to 'moz:firefoxOptions' options, the error message changes to:
ERROR #wdio/runner: Error: Only Nightly release channel is supported in Devtools/Puppeteer for Firefox. Refer to the following issue:
...
Any ideas how it could be fixed in webdriverIO (without installing separately puppeteer or puppeteer-firefox)?
Thanks!
Seems that I took desired for real.
wdio + devtools:puppeteer still work with Firefox Nightly only – https://github.com/webdriverio/webdriverio/discussions/7916

chromedp fails to start a new instance of chrome

Hey guys I have been trying to automate a task on my browser's machine using chromedp.
I tried examples on the repo however they always fail:
unexpected fault address 0x7f7a36461000 fatal error: fault [signal SIGBUS: bus error code=0x2 addr=0x7f7a36461000 pc=0x53a9d5]
Example's source code am running can be found here.
As I understand chromedp comes with headless pre-compiled version of chrome. I have browsed the API documentation to see if it possible to pass a port on which the dev tools is listening, no success.
However when I tried mafredri/cdp it worked. I came to understand that chromedp is failing to start its embedded chrome. Although, I am not really sure. Why is this happening?
My env:
Google Chrome 85.0.4183.102
Ubuntu 18.04.4 LTS
go version go1.13.5 linux/amd64
Any help would be truly appreciated.
So, long story short I went to run tests on the chromedp locally installed library through go test, it failed. I opened an issue on the Github repo. While it was not indicated that it requires Go 1.14+ but it does.
If you encountered this issue, please proceed to first run the tests on the master branch locally installed library. If it is fails with the following log:
github.com/chromedp/chromedp [github.com/chromedp/chromedp.test]
./chromedp_test.go:862:3: t.Cleanup undefined (type *testing.T has no
field or method Cleanup) ./chromedp_test.go:948:5: t.Cleanup undefined
(type *testing.T has no field or method Cleanup)
./chromedp_test.go:950:5: t.Cleanup undefined (type *testing.T has no
field or method Cleanup) FAIL github.com/chromedp/chromedp [build
failed]
You need to know that t.Cleanup was added on Go 1.14 (credits to Oiyoo).
I hope this helps you if you are having the same problem.

Ruby Cucumber: Chrome Driver failed to start

I am trying to Launch chrome browser from Ruby Cucumber framework. But i see it is throwing me an error.
I followed the solutions from stack overflow i.e., to re install chrome application but i see it apparently not working for me.
Here is the code from env.rb file.
require 'selenium-webdriver'
Before do
Selenium::WebDriver::Chrome.driver_path="E:/chromedriver.exe"
$driver=Selenium::WebDriver.for(:chrome)
end
Error is see is as follows.
E:\Eclipse\LoginMercury>cucumber
*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansic
on/) to get coloured output on Windows
Feature: Registration and Login to Mercury Portal
Scenario: Registrating new user in Portal # features/Login.feature:3
unknown error: chrome failed to start
(Driver info: chromedriver=2.3,platform=Windows NT 6.1 x86) (Selenium::WebDr
iver::Error::UnknownError)
./features/support/env.rb:4:in `Before'
Given Load Home page # features/step_definitions/Log
inStep.rb:1
When User need provide Username and password # features/step_definitions/Log
inStep.rb:6
Then Login to Portal # features/step_definitions/Log
inStep.rb:10
Failing Scenarios:
cucumber features/Login.feature:3 # Scenario: Registrating new user in Portal
1 scenario (1 failed)
3 steps (3 skipped)
0m1.180s
As I am using Windows 7, I've tried with older versions of chrome driver even.(V2.3). Yet i failed.
Can someone help me in moving further.
Thanks...!!!!
This is an error when using an older version of the chrome driver such as your version 23 and the latest version of chrome browser.
Upgrade and replace the driver, that your automation path is using for it, to the latest version 27 and this will fix this error.
https://sites.google.com/a/chromium.org/chromedriver/downloads
Cheers.

geckodriver not launching firefox

I am using firefox v 48.0.2 and am trying to get my selenium (selenium-server v2.53) remotedriver automated tests to run on firefox, I have geckodriver 0.9.0 installed and when i go through the documentation on the github readme and run this command: (on mac osx 10.11.3)
geckodriver -b /Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin
i get this error message:
thread '< main >' panicked at 'called Result::unwrap() on an Err value: Io(Error { repr: Os { code: 48, message: "Address already in use" } })', ../src/libcore/result.rs:746
note: Run with RUST_BACKTRACE=1 for a backtrace.
ive tried ignoring this step but when i run my tests firefox does not launch, i have ensured that my webdriver capabilities include marrionette: true
WebDriver:
browser: 'firefox'
clear_cookies: false
restart: false
window_size: 414x736
marionette: true
other than that i can not find any documentation to lead me in the correct direction, did i perhaps over look something? any help is greatly appreciated!
I am also using codeception to handle my tests (php)
EDIT
I was able to get this command to work after killing the process that was listening on port 4444:
geckodriver -b /Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin
But even with that running Firefox is still not launching

sencha web start fails exception osx

I've installed sencha cmd on mac os x 10.7.5. When I try to start the web server with the command: "sencha web start" I receive the following error message:
[...]
14:28:03.274 [main] ERROR com.sencha.command.Sencha - org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
at com.sencha.exceptions.BasicException.wrap(BasicException.java:51)
at com.sencha.exceptions.BasicException.stealthify(BasicException.java:43)
at com.sencha.exceptions.BasicException.raise(BasicException.java:35)
at com.sencha.cli.Command.dispatch(Command.java:64)
at com.sencha.cli.Commands.dispatch(Commands.java:64)
at com.sencha.cli.Commands.dispatch(Commands.java:64)
at com.sencha.command.Sencha.dispatch(Sencha.java:80)
at com.sencha.command.Sencha.main(Sencha.java:148)
[...]
Is anyone has some idea what can be wrong ? I've tried both sencha cmd versions 5.0.0 and 4.0.4...and the error message is always the same. I'm absolutely beginner in sencha so maybe Im doing something completely wrong

Resources