I have a selenium webdriver test, converted to maven project, that I want to run via xvfb on Jenkins.
There is a problem with display selection, but I would like to try something else and change the port, for example.
This is the error I get:
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms.
Firefox console output:
Error: no display specified
Error: no display specified
And this is my code:
File ffExe = new File("/usr/bin/firefox");
FirefoxBinary ffox = new FirefoxBinary(ffExe);
ffox.setEnvironmentProperty("DISPLAY", ":21");
WebDriver driver = new FirefoxDriver(ffox, null);
So, how can I tell firefox to use another port and which one should I specify?
There is a System property -webdriver.firefox.port which could be the answer for yoru query. It is listed on the wiki - http://code.google.com/p/selenium/wiki/FirefoxDriver, but there is no documentaion provided for the same. You can try and let us know if it works :)
The problem is not that it can't connect on that port, but rather the second part of the error, that there is no display specified in Jenkins. That's why setting the display for Firefox is probably not working.
Find out what your display settings are by typing env in the terminal and taking down the number assigned to your DISPLAY variable. For example DISPLAY:1.0.
Next you need to set the display variable in Hudson/Jenkins. Navigate to the Jenkins landing page then click Manage Jenkins>Manage Nodes>Master>Configure. Check the Environment variables check box, then set DISPLAY in the name box, and the value to something like our example :1.0.
Additionally you'll probably need to disable your xhost access controls using xhost + in the terminal.
Related
I am using the library https://github.com/aik099/PhpStormProtocol/ to get links to my IDE (PHPStorm) from the browser (Chrome). Everytime xdebug prints a warning, it attaches a link with an href like this:
phpstorm://open?file={filepath}&line={line}
That works perfect. The problem is that every time I click in the link I get a pop-up like this:
I have tried following the steps I found here:
https://superuser.com/questions/1481851/disable-chrome-to-ask-for-confirmation-to-open-external-application-everytime
After enabling that policy in the register of windows, and validating it also in my browser I still have the same pop-up without the checkbox to allow this protocol forever.
The problem is, that you want to open your url handler over a "http" connection.
But you get only the square if you have a "https" connection.
You can solve your problem if you set a rule, that your "http" connection is trusted.
For chrome write "chrome://flags/" in your address bar and write your url into the option "Insecure origins treated as secure" and set this to enable.
enter image description here
The ExternalProtocolDialogShowAlwaysOpenCheckbox does work on https websites only.
You can instead add you protocol phpstorm://* to Chrome's URLAllowlist, for example via the Windows registry :
The user will not see the popup at all and the software will open automatically.
Using Registry 5.1 - Any attempt to add a wsdl, displays a depreciated message, 'use https://localhost:9445/publisher', but any attempt to use this url fails because the subsequent login screen doesn't seem to know about the port 'offset' feature - basically I suspect there is a bug when Registry is not deployed on the default port.
https://localhost:9443/publisher/acs?loginStatus=true
i.e. its using wrong port should be + 1
Possibly finger trouble? should this work & I'm missing something?
In order to access publisher and store after port offset, you need to change the content of the <GREG_HOME>/repository/conf/identity/sso-idp-config.xml. You need to specify the correct port number in that file. Please refer to the following config; here port offset of 3 is used:
<AssertionConsumerService>https://localhost:9446/publisher/acs</AssertionConsumerService>
Not able to open websites home page using jMeter, getting an error
Using following configuration
jmeter version: 2.13
and I just trying to open google page and same error getting while opening my website's page.
Please refer screenshots for settings and results.
Test scenario itself is correct. Seems like something is wrong with JVM. Any info messages in console after start?
Try with google IP instead of hostname to make sure that it's not a DNS issue.
Did you run it with any specific flags like -H or -P? Do you use proxy?
I have imported the certificate - ApacheJMeterTemporaryRootCA.crt
but still I am getting the below message and it doesn't record.
Please suggest.
Steps I followed:
Under Workbench, I have added a 'HTTP(S) Test Script Recorder' > then a 'Sample Controller'.
I am clicking the Start button in the 'HTTP(S) Test Script Recorder' to start recording.
I have set the Port to 8080 and same I have set in my IE web browser.
To be sure to setup correctly recording use Recording Template.
Then configure your browser to point to the proxy host / ports
Check it's ok by calling a page in browser BEFORE STARTING RECORDER, if you get proxy error then it's OK if you get the page, fix your proxy settings in Browser.
Start Browser
Call Https Page and accept exception
Read this:
http://jmeter.apache.org/usermanual/component_reference.html#HTTP%28S%29_Test_Script_Recorder
I go throught the intranet/internet using proxy auth.
I'm not familiar with automation throught a proxy or proxys, in IExplorer we set up the proxy on LAN settings in "Use automatic configuration script" with something like:
http://some-url/url/file.proxy
Uncheck "Automatically detect settings" and we don't set any in the "Proxy Server" section.
So we can go "out" (internet/intranet).I have a username/password so everytime I just open a new IE instance, I got a prompt for them. How should I set this values on PhantomJS to get access to the network/internet ? I jus can't make it work, everytime I try to get a screenshot from anypage I got a webpage screenshot related to the proxy auth.
I've tried set the full/script.proxy url in the proxy prop and username/password but didn't work. Hope someone can provide an example for my understanding. Also I'll appreaciate some resources/good-to-read articles.
Got it.
I take a look to the script I just mentioned in my question, and just got the proxy (ip:port) needed in phantomJS.
Basically the script do some decisions about what proxy to use based on the requested url and return the proxy ip.
So the PhantomJS docs it's preety straightforward, I wasn't understanding how my proxy was set (by script),if it's your case, you can copy/paste the script url into your browser so you can analyze it and retrieve the information you need to setup phantomJs
he code in the proxy script is kind of easy to read (if you have any programming experiencie).