I want start firefox with my custom profile, and when I add some plugins (for example) in this session starting from selenium I want he do not forgot them.
I started selenium server
start "JAVA Selenium Server" java -jar selenium-server.jar -interactive -firefoxProfileTemplate "D:\Ogame\SeleniumStaticProfile"
Then in selenium server
cmd=getNewBrowserSession&1=*custom firefox.exe -p SeleniumStatic -no-remote&2=http://www.google.com
cmd=open&1=httttp://www.hotmail.com
cmd=open&1=httttp://www.google.pl
and i'm gettings error something like:
www.goole.com havent rights to read properties Window.seleniumMarker1299...
All log:
cmd=getNewBrowserSession&1=*custom firefox.exe -p SeleniumStatic
-no-remote&2=ht tttp://www.google.com 13:54:50.817 INFO - ---> Requesting
htttttp://localhost:4444/selenium-server/driver
?cmd=getNewBrowserSession&1=*custom
firefox.exe -p SeleniumStatic
-no-remote&2=h tttttp://www.google.com 13:54:50.823 INFO - Command request:
getNewBrowserSession[*custom
firefox.exe -p SeleniumStatic
-no-remote, htttttp://www.google.com] on session null 13:54:50.824 INFO -
creating new remote session
13:54:50.832 INFO - Allocated session
ad3e48137d024959863ab8bb4c297d55 for
httttp: //www.google.com, launching...
13:54:54.615 INFO - Got result:
OK,ad3e48137d024959863ab8bb4c297d55 on
session a
d3e48137d024959863ab8bb4c297d55
cmd=open&1=http://www.wp.pl
13:55:23.588 INFO - ---> Requesting
httttp://localhost:4444/selenium-server/driver
?cmd=open&1=htttttp://www.wp.pl&sessionId=ad3e48137d024959863ab8bb4c297d55
13:55:23.595 INFO - Command request:
open[htttttp://www.wp.pl, ] on session
ad3e481 37d024959863ab8bb4c297d55
13:55:23.596 WARN - you appear to be
changing domains from
httttp://www.google.com to
htttttp://www.wp.pl this may lead to a
'Permission denied' from the browser
(unless it is running as *iehta or
*chrome, or alternatively the selenium server is runnttting in proxy
injection mode) 13:55:23.691 INFO -
Got result: Witrynie
http://www.google.com nie udzielono
u prawnien do odczytania wlasciwosci
Window.document z
on sessi on
ad3e48137d024959863ab8bb4c297d55
Of course I have entered proxy in Firefox SeleniumStatic profile (localhost:4444)
What am I doing wrong?
Sorry for my bad english :/
Change your commands to look like the following
cmd=getNewBrowserSession&1=*firefox -no-remote&2=http://www.google.com
cmd=open&1=httttp://www.hotmail.com
cmd=open&1=httttp://www.google.pl
YOu don't need to specify the profile since you have already done that when starting the Selenium Server.
Related
I have installed streamlit on my Mac with pdm and launched the command streamlit hello to view the demos. The command returns the following:
❯ pdm run streamlit hello
2022-03-21 11:43:45.812 WARNING streamlit.config:
Warning: the config option 'server.enableCORS=false' is not compatible with 'server.enableXsrfProtection=true'.
As a result, 'server.enableCORS' is being overridden to 'true'.
More information:
In order to protect against CSRF attacks, we send a cookie with each request.
To do so, we must specify allowable origins, which places a restriction on
cross-origin resource sharing.
If cross origin resource sharing is required, please disable server.enableXsrfProtection.
2022-03-21 11:43:45.816 DEBUG streamlit.logger: Initialized tornado logs
2022-03-21 11:43:45.818 DEBUG matplotlib.pyplot: Loaded backend agg version unknown.
2022-03-21 11:43:45.819 DEBUG streamlit.bootstrap: Setting up signal handler
2022-03-21 11:43:45.819 DEBUG asyncio: Using selector: KqueueSelector
2022-03-21 11:43:45.827 DEBUG streamlit.server.server: Starting server...
2022-03-21 11:43:45.827 DEBUG streamlit.server.server: Serving static content from the Node dev server
2022-03-21 11:43:45.830 DEBUG streamlit.server.server: Server started on port 8501
2022-03-21 11:43:45.831 DEBUG streamlit.server.server: Server state: State.INITIAL -> State.WAITING_FOR_FIRST_BROWSER
2022-03-21 11:43:46.029 DEBUG git.cmd: Popen(['git', 'version'], cwd=<my/working/directory>, universal_newlines=False, shell=None, istream=None)
2022-03-21 11:43:46.041 DEBUG git.cmd: Popen(['git', 'version'], cwd=<my/working/directory>, universal_newlines=False, shell=None, istream=None)
2022-03-21 11:43:46.054 DEBUG git.cmd: Popen(['git', 'version'], cwd=<my/working/directory>, universal_newlines=False, shell=None, istream=None)
2022-03-21 11:43:46.066 DEBUG git.cmd: Popen(['git', 'rev-parse', '--show-toplevel'], cwd=<my/working/directory>, universal_newlines=False, shell=None, istream=None)
Welcome to Streamlit. Check out our demo in your browser.
Local URL: http://localhost:3000
Network URL: http://192.168.1.117:3000
Ready to create your own Python apps super quickly?
Head over to https://docs.streamlit.io
May you create awesome apps!
However, when I connect to the local URL, the connection is rejected:
I tried switching to Brave Browser and Firefox, but I got the same error.
From other SO questions, I tried the following:
❯ apachectl configtest
AH00557: httpd: apr_sockaddr_info_get() failed for Lucas-MacBook-Air.local
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
I also ran this:
ps -ax | grep 'httpd'
124 ?? 0:00.85 /usr/sbin/httpd -D FOREGROUND
517 ?? 0:00.00 /usr/sbin/httpd -D FOREGROUND
6627 ttys002 0:00.01 grep httpd
I tried launching other stuff that creates a local server, e.g. Jupyter Notebooks, and they work.
The problem is known: streamlit does not support pdm at the time of writing, as mentioned by #cye18 on the parallel issue opened on pdm's github page.
The problem is that, while streamlit configs default to server port 8501, the server is launched on the port 3000. You can force this behaviour in two ways.
The first is by manually changing streamlit's settings, which lies in ~/.streamlit/config.toml or locally in your project directory.
[server]
serverPort = 8501
Alternatively, you can add the following flag to the streamlit command when launching it:
pdm run streamlit run app.py --server.port 8501
Either way, streamlit will complain by saying that server.port does not work when global.developmentMode is true. Once again, this can be solved by adding the flag --global.developmentMode false. The final command will look like this: pdm run streamlit run app.py --server.port 8501 --global.developmentMode false.
Alternatively, the local settings will look like the following:
[server]
port = 8501
[global]
developmentMode = false
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
I followed exact same step as per [1] and when I execute
./gradlew tomcatRunWar
Process didn't work after 92%
16:14:48.912 [localhost-startStop-1] INFO o.s.j.c.CachingConnectionFactory - Established shared JMS Connection: ActiveMQConnection {id=ID:Gayans-MacBook-Pro.local-58639-1559299488784-1:1,clientId=null,started=false}
16:14:48.971 [localhost-startStop-1] INFO o.a.f.i.c.b.WarWebApplicationInitializer - Started WarWebApplicationInitializer in 58.585 seconds (JVM running for 141.561)
The following warnings have been detected with resource and/or provider classes:
WARNING: A HTTP GET method, public java.lang.String org.apache.fineract.portfolio.self.savings.api.SelfSavingsApiResource.template(java.lang.Long,java.lang.Long,java.lang.String,javax.ws.rs.core.UriInfo), should not consume any entity.
Started Tomcat Server
The Server is running at http://localhost:8080/fineract-provider
Building 92% > :tomcatRunWar
[1] https://github.com/apache/fineract
./gradlew tomcatRunWar is actually a way to run the Fineract App in Dev mode. The logs you pasted shows Fineract is actually doing the right thing by starting up in Dev mode. What you can do now is get the web app here: https://github.com/openMF/community-app, build it using the instructions in the read me and try to login to the Fineract backend using username: mifos, password: password
I have a headless EC2 M1.Small instance running Ubuntu. I have been trying to use it to run a selenium test coded in Ruby. I am running selenium server 2.0b3 (the latest).
i have enabled XVFB:
$ sudo startx -- which Xvfb :1 -screen 0 1024x768x24 2>&1 >/dev/null &
[1] 1119
$ DISPLAY=:1 java -jar Automation/ruby-selenium-framework/selenium-server-1.0.3/selenium-server.jar > /tmp/selenium_log.log &
[2] 1245
And then run my code:
$ ./BTRuby.rb coverage_
I get the following output to the selenium log:
14:11:27.448 INFO - Command request: getNewBrowserSession[*firefox, URL, , ] on session null
14:11:27.448 INFO - creating new remote session
14:11:27.448 INFO - Allocated session 4b1395b136174ab798eddd6a59d8e308 for URL, launching...
14:11:27.488 INFO - Preparing Firefox profile...
14:11:30.709 INFO - Launching Firefox...
14:11:35.873 INFO - Got result: OK,4b1395b136174ab798eddd6a59d8e308 on session 4b1395b136174ab798eddd6a59d8e308
14:11:35.878 INFO - Command request: setTimeout[30000000, ] on session 4b1395b136174ab798eddd6a59d8e308
14:11:35.937 INFO - Got result: OK on session 4b1395b136174ab798eddd6a59d8e308
14:11:36.007 INFO - Command request: open[URL, ] on session 4b1395b136174ab798eddd6a59d8e308
Can anyone provide any help? It just seems to hang at this last INFO line.
BTW, the URL variable is a valid URL that I have stripped out for purposes of this question
sudo startx -- which Xvfb :1 -screen 0 1024x768x24 2>&1 >/dev/null &
DISPLAY=:1 java -jar selenium-server-1.0.3/selenium-server.jar > /tmp/selenium_log.log &
was able to do the trick
I'm running test using behat, but this basically runs phpunits selenium driver, to do integration tests
everything was working fine but for no apparent reason firefox quits at some point in the middle of my test suite the selenium rc log looks like this
09:23:53.157 INFO - Command request: setTimeout[30000, ] on session 62b513ea550a419898a79f912beecc69
09:23:53.180 INFO - Got result: OK on session 62b513ea550a419898a79f912beecc69
09:23:53.263 INFO - Command request: open[/request/step1, ] on session 62b513ea550a419898a79f912beecc69
09:23:53.318 INFO - Got result: XHR ERROR: URL = http://local-test.account/request/step1 Response_Code = -1 Error_Message = Request Error on session 62b513ea550a419898a79f912beecc69
09:23:53.321 INFO - Command request: testComplete[, ] on session 62b513ea550a419898a79f912beecc69
09:23:53.321 INFO - Killing Firefox...
09:23:53.356 INFO - Got result: OK on session 62b513ea550a419898a79f912beecc69
09:23:53.371 INFO - Command request: open[/request/step1, ] on session null
09:23:53.374 ERROR - Exception running 'open 'command on session null
at what point in the test it quits doesn't seem to follow any pattern.
i've tried rolling my projects code back to before I was having problems but to no avail
If you are using Selenium 1.3, try upgrading to Selenium 2.0. Here is how I resolved my problem with selenium.open();
This is possible when you are not passing correct website address. What are you passing, what is the URL of your website.