I have for loop which takes about 30 minutes.so when run the browser's time out.I change max execution time in php.INI but give the same error.
I how I can do to change setting in Firefox?in order my script to run successfully.
For altering the connection time out in firefox
Open Firefox & type in ‘about:config’ in the address bar & press Enter.
Accept 'I'll be careful, I promise' button.
Search for network.http.connection-timeout and enter the value(in seconds)
Related
I try to create a program which will automate fetching data from one of the Google services. By using chrome and watir (which is basically a Ruby library build on top of the Selenium). Everything works fine as long as I keep my browser open. But when I minimize window, my program is not even able to pass a login process since it cannot find certain elements. This is my code to login:
#browser = Watir::Browser.new :chrome, options: { detach: true }
#browser.goto BASE_URL
#browser.text_field(name: 'identifier').set USER_EMAIL
#browser.element(xpath: '//*[#id="identifierNext"]').click
#browser.text_field(xpath: '//input[#type="password"]').set USER_PASSWORD
#browser.element(xpath: '//*[#id="passwordNext"]/div/button/div[2]').click
When my browser is minimize, during attempt to set a password I get this error message:
*** Watir::Exception::UnknownObjectException Exception: element located, but timed out after 30 seconds, waiting for
#<Watir::TextField: located: true; {:xpath=>"//input[#type="password"]", :tag_name=>"input"}> to be
present
And it works just fine as an open window. Even if I maximize the window during whole process program is suddenly able to locate missing input fields. The same story goes in many other points further. Program is not able to locate some elements unless chrome window is open.
Needless to say it works even worse in headless mode and I'm basically not able to locate any of those elements in html code.
As far as I understand Google services frontend side are build with Angular framework which inject html code dynamically. But shouldn't selenium pretend to act like a regular user and trigger the same responses on minimized and open window (and the headless mode as well)?
Is is some kind of blockade from Google to prevent this kind of automated proces and how can I bypass it?
Is this an issue with Chrome and switching for e.g. Firefox would fix it?
Can I implement some additional actions to actually mimic human interaction and pretend that my Chrome window is open?
When a site receives high traffic, the tab in Mozilla Firefox stops loading and displays this error message "PR_CONNECT_RESET_ERROR" as shown in screen shot.
What I want is, the tab should continuously keep loading until it receives the response from the site's server without displaying this error or I want to increase the duration(time or number) for which it keeps trying to connect to that site's server by default.
I don't know whether it is possible or not but what I tried is, I changed some of the configurations from about:config. I increased network.http.keep-alive.timeout from 120 to 215 and network.http.max-persistent-connections-per-server from 6 to 20. But I don't find any noticeable change.
Are there better possibilities for achieving my expectations ?
Note: I approximately make 30-40 requests to same url(www.example.com) from different tabs with different sessions.
I want to create a script, which accesses a website behind a login (with 2FA) and press the submit button every x seconds.
Unfortunately, I am a total Shell noob, but I already automated the process with the Chrome extensions "Kantu Browser Automation", but the extension has limits on the looping and a looping timeout.
use curl command for this and put it crontab.
curl:
https://curl.haxx.se/
you have to use POST method.
crontab:
https://crontab.guru/
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.
In my company, we access some databases through a local server, through firefox/chrome/safari, by using a URL of the format:
http://server_name:port/path
this means that it does not need the prefix www. or the suffix .com. The problem is that recently the browser has started to add these by itself either when we just start up the browser or when a new page is loaded, thus making the URL:
http://www.server_name.com:port/path
which, of course, is not the right URL and it does not allow to connect to our server or it disconnects us in the middle of a process. Is there a way to stop the browser from adding these automatically?
Thank you in advance for your help!
I never had an issue with this until Firefox 14. The answer I found to the problem from the last couple years is:
In the Location bar, type about:config and press "Enter"
The about:config "This might void your warranty!" warning page may appear. "Click I'll > be careful, I promise!", to continue to the about:config page.
In the Search field, type "browser.fixup.alternate.enabled"
Double-click the "browser.fixup.alternate.enabled" preference to set its value to false.
This seems to have worked for people, but not for me. After searching through the config I found browser.urlbar.autocomplete.enabled. I turned this off and it did the trick. So if the previous doesn't work, try:
In the Location bar, type about:config and press "Enter"
The about:config "This might void your warranty!" warning page may appear. "Click I'll > be careful, I promise!", to continue to the about:config page.
In the Search field, type "browser.urlbar.autocomplete.enabled"
Double-click the "browser.urlbar.autocomplete.enabled" preference to set its value to false.
Edit: disabling browser.urlbar.autoFill instead of autocomplete also fixes the issue while still showing suggested results from your history.
If you just type server_name into the search/url bar the browsers try to be helpful and guess what the URL should be or switch to a search. However if you click on a HTML link, enter the full URL (http://server_name), or use a bookmark the browsers should respect what was entered.
If all the suggestions found here and elsewhere on the interweb don't work (like they did not for me) check your proxy settings if inside corporate environment.
I had to manually set proxy - it did not take the global settings. Options - Network - Settings - 'Automatic proxy configuration url' fixed it for me.