I am using a grunt task that calls the 'webdriver-manager' node module to start my selenium webdriver. Right now it is configured to launch chromedriver, and gives me this line whenever I launch the grunt task: 'start_webdriver':
[10:49:13] I/start - java -Dwebdriver.chrome.driver=/Users/talain/development/gitClone/enterprise/Source/clients-root/clients-webui-root/clients-webui-interface/node_modules/webdriver-manager/selenium/chromedriver_2.29
The phantomjs driver is located in the same directory as the chromedriver, but I don't know where the configuration is that would allow me to change it. Here is the full output of launching 'start_webdriver' grunt task:
/usr/local/bin/node /Users/talain/development/gitClone/enterprise/Source/clients-root/clients-webui-root/clients-webui-interface/node_modules/grunt-cli/bin/grunt --gruntfile /Users/talain/development/gitClone/enterprise/Source/clients-root/clients-webui-root/clients-webui-interface/Gruntfile.js "testing:start webdriver"
Running "execute:start_webdriver" (execute) task
-> executing /Users/talain/development/gitClone/enterprise/Source/clients-root/clients-webui-root/clients-webui-interface/node_modules/webdriver-manager
[10:49:13] I/start - java -Dwebdriver.chrome.driver=/Users/talain/development/gitClone/enterprise/Source/clients-root/clients-webui-root/clients-webui-interface/node_modules/webdriver-manager/selenium/chromedriver_2.29 -Dwebdriver.gecko.driver=/Users/talain/development/gitClone/enterprise/Source/clients-root/clients-webui-root/clients-webui-interface/node_modules/webdriver-manager/selenium/geckodriver-v0.15.0 -jar /Users/talain/development/gitClone/enterprise/Source/clients-root/clients-webui-root/clients-webui-interface/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.3.1.jar -port 4444
[10:49:13] I/start - seleniumProcess.pid: 8081
10:49:13.978 INFO - Selenium build info: version: '3.3.1', revision: '5234b32'
10:49:13.979 INFO - Launching a standalone Selenium Server
2017-04-13 10:49:14.002:INFO::main: Logging initialized #277ms to org.seleniumhq.jetty9.util.log.StdErrLog
10:49:14.062 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform MAC
10:49:14.062 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform MAC
10:49:14.062 INFO - Driver class not found: com.opera.core.systems.OperaDriver
10:49:14.062 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped:
Unable to create new instances on this machine.
10:49:14.063 INFO - Driver class not found: com.opera.core.systems.OperaDriver
10:49:14.063 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
2017-04-13 10:49:14.106:INFO:osjs.Server:main: jetty-9.2.20.v20161216
2017-04-13 10:49:14.141:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler#685cb137{/,null,AVAILABLE}
2017-04-13 10:49:14.174:INFO:osjs.AbstractConnector:main: Started ServerConnector#5bcab519{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2017-04-13 10:49:14.175:INFO:osjs.Server:main: Started #450ms
10:49:14.175 INFO - Selenium Server is up and running
webdriver-manager start does not have a way to launch with phantomjs. I would suggest launching it manually. You could launch it with:
java -Dphantomjs.binary.path=/path/to/phantomjs -jar /path/to/selenium-server-standalone.jar -port 4444
Why is there no phantomjs support in webdriver-manager? Protractor does not recommend or support phantomjs. See browser support.
Related
I need to build a Docker image for Windows platform containing an ASP.Net Framework 4.8 application using Github Action.
In build step, it throws an error
Building Docker image *** with tags latest...
WARNING: No output specified with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load
#1 [internal] booting buildkit
#1 pulling image moby/buildkit:buildx-stable-1
#1 pulling image moby/buildkit:buildx-stable-1 0.2s done
#1 creating container buildx_buildkit_builder-b7ba0de1-52b2-435b-aa7d-8311039928160 done
#1 ERROR: Error response from daemon: Windows does not support privileged mode
------
> [internal] booting buildkit:
------
ERROR: Error response from daemon: Windows does not support privileged mode
In the post
Github Action for Windows platform "Windows does not support privileged mode"
the author says he solved the problem by changing the build action to mr-smithers-excellent/docker-build-push#v5 but it didn't work for me.
My script:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout#v3
- name: Setup MSBuild
uses: microsoft/setup-msbuild#v1
- name: Docker Setup Buildx
uses: docker/setup-buildx-action#v2.0.0
with:
install: true
- name: Build Docker images
uses: mr-smithers-excellent/docker-build-push#v5.8
with:
image: ******
tags: latest
registry: *****
dockerfile: *****
My Dockerfile
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
ARG source
WORKDIR /inetpub/wwwroot
COPY ${source:-obj/Docker/publish} .
cmd
I host a web site with Nginx in Debian in google cloud.
when I install code server and i visit: my_ip:8443, chrome replied with: ERR_CONNECTION_TIMED_OUT.
when I execute the command code-server:
INFO code-server v1.1156-vsc1.33.1
INFO Additional documentation: http://github.com/cdr/code-server
INFO Initializing {"data-dir":"/home/naji/.local/share/code-server","extensions-dir":"/home/naji/.local/share/code-server/extensions","working-dir":"/","log-dir":"/home/naji/.cache/code-server/logs/20190723145420188"}
INFO Starting webserver... {"host":"0.0.0.0","port":8443}
WARN No certificate specified. This could be insecure.
WARN Documentation on securing your setup: https://github.com/cdr/code-server/blob/master/doc/security/ssl.md
INFO
INFO Password: ******************
INFO
INFO Started (click the link below to open):
INFO https://localhost:8443/
INFO
INFO Starting shared process [1/5]...
WARN stderr {"data":"(node:17025) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.\n"}
INFO Connected to shared process
what is the solution ?
I am unable to connect to the Selenium server.
I'm using RSelenium to automate data collection for a school project.
What baffles me is that it has worked every day for two weeks now, but I restarted my macbook so had to reconnect to the Selenium server, and now I can't make it run.
I've tried reinstalling firefox, the geckodriver, the selenium standalone server, and tried running it with chrome.
I've put this in the terminal:
java -jar /Users/x/data/selenium-server-standalone-3.141.59.jar -port 5556
This is what I do in R:
remDr <- RSelenium::remoteDriver(extraCapabilities = list(marionette = TRUE), port=5556)
remDr$open()
I get this error message when running remDr$Open():
Selenium message:Unable to create new service: GeckoDriverService
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'MacBook-Pro-3.local', ip: '[sensitive info removed]', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.3', java.version: '11.0.2'
Driver info: driver.version: unknown
Error: Summary: SessionNotCreatedException
Detail: A new session could not be created.
Further Details: run errorDetails method
I am able to run it with Docker and Tight VNC, but sadly this throws a lot of errors as I need to use the debug version for my data collection.
Hmmm never seen this type of error before. #jdharrison can you look at this?
I have project via SSH in PhpStorm.
I'm trying run PHPUnit script with debugger and I see this message:
Connection with 'Xdebug 2.6.0' was not established
In xdebug.log I see:
Log opened at 2018-07-11 08:52:42
I: Connecting to configured address/port: 46.170.254.34:9001.
W: Creating socket for '46.170.254.34:9001', poll success, but error: Operation now in progress (29).
E: Could not connect to client. :-(
Log closed at 2018-07-11 08:52:42
In console I see:
ssh://xxxx#xxxx.pl:22/usr/bin/php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9001 -dxdebug.remote_host=11.11.11.11 /home/path/vendor/phpunit/phpunit/phpunit --bootstrap /home/path/vendor/autoload.php --configuration /home/path/phpunit.xml --filter "/(::testGettingMe)( .*)?$/" App\Tests\Functional\Context\Api\MeControllerTest /home/path/tests/Functional/Context/Api/MeControllerTest.php --teamcity
Any suggestion?
My Jmeter-webdriver webdriver sampler script is executed finely on chrome browser, whereas when same script is executed the on htmlunitdriver it throws an error.
To configure a HtmlUnitdriver followed the steps:-
Thread Group > Add > Listener > jp#gc- HtmlUnitDriver Config
2016/12/23 14:26:51 ERROR - com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler: com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot find function addEventListener in object [object Window]. (https://test.html
Build info: version: '2.52.0', revision: '4c2593d28', time: '2016-02-11 11:22:43'
System info: host: 'EN09', ip: '192.168.254.2', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_111'
Driver info: driver.version: HtmlUnitDriver
Please let me know how to run Webdriver sampler script on Htmlunitdriver successfully
Quick checklist:
Are you able to run something "minimal" successfully, i.e.:
WDS.sampleResult.sampleStart()
WDS.browser.get('http://example.com')
WDS.sampleResult.sampleEnd()
If the answer is "No" - it may be installation issue, I would recommend reinstalling the Selenium/WebDriver Support plugins bundle via JMeter Plugins Manager:
Are you able to execute your test using HtmlUnitDriver from Java code (without JMeter)?
If the answer is "No" - check if the issue is present here: https://sourceforge.net/p/htmlunit/bugs/ and if not - report it.
If you can run your test scenario from Java and not able to run it with JMeter - report it to JMeter Plugins forum
The viable workaround for headless Selenium tests execution using JMeter is PhantomJS Driver