i have created firefox template and started selenium server from command line giving -firefoxProfileTemplate "path to the profile" but still it asks for proxy?
any solutions?
Have you changed the lan settings for your new FF profile to use the proxy?
When the tests open the FF browser, check the proxy settings manually and see if its there? If not, then Selenium might still be NOT using the correct profile.
Related
I have a Selenoid Firefox container running some tests but new browser versions are giving me issues.
Since Firefox 103.0 Cross-site tracking cookies are blocked by default and I am looking for a way to add a website exception in Privacy & Security > Cookies and Site Data using Firefox capabilities / Options but nothing seems to do the trick.
A good example of website that causes issues is https://teams.microsoft.com where firefox will now ask you if you "Really want to accept cookies from there ?" which I am trying to bypass by setting website exception in advance.
Done it by selecting a profile at geckodriver start instead of letting it generate one: Add args: ["-profile", "/binary/nameoffirefoxprofile"] to capabilities pref in your code. For this you need to get a firefox profile folder and copy it to your container first. If this works it will replace the generated rust_mozprofile_someID of geckodriver.
I want to open an application website on Firefox browser using Selenium Webdriver as a different user.
Currently, I am using gecko driver to open that application link, it successfully opens up the browser but unable to open the application link.
But I am able to achieve the same manually by going to Mozilla Firefox icon and clicking on
"Run as different user"
option (as shown in below image) which further open a popup for user credentials and by entering Username and Password of different user there I am able to open the application link in browser.
So, is there any way that I can achieve same process using Selenium Webdriver and opens up my application link.
Thanks in Advance!!
You should rather create Firefox profile by running firefox.exe -p to launch profile manager. Then you can instantiate firefox web driver implementation and configure it to use given profile.
Are you sure that you want to use pre-configured profile? I find much easier to manage to run drivers in private/incognito mode and set cookies manually to configure tests.
You might provide firefox_binary as a parameter for the webdriver:
http://selenium-python.readthedocs.io/api.html
firefox_binary – Instance of FirefoxBinary or full path to the Firefox
binary. If undefined, the system default Firefox installation will be used.
...so, you might use a wrapper script to run firefox as the different user (use sudo in Linux).
I'm trying to use Fiddler 4.6.2.3 as the proxy for Selenium RC (the standalone server .jar file v2.53.0) in Firefox instead of Selenium RC's built-in proxy. I'm doing this because I want to take advantage of Fiddler's capabilities. I have Fiddler working correctly with Firefox for both HTTP and HTTPS. I have Selenium RC working correctly with the "*firefox" profile using the standalone Selenium RC server .jar file. What I'd like to do is replace Selenium's built-in proxy with Fiddler.
I am launching both Fiddler and Selenium RC from the same .BAT file. I launch Fiddler first, then launch a test suite using the Selenium RC standalone server. When I remark out the Fiddler launch in the .BAT file, the Selenium RC test suite executes perfectly. When I launch Fiddler, then launch the Selenium RC test suite (both from the .BAT file), Selenium RC complains that Fiddler's security certificate is a problem and the Selenium RC test suite fails.
I'm new to the world of automated testing and Selenium. I've tried using the Selenium RC command line option -avoidProxy to see if Selenium RC would somehow "find" Fiddler if it was instructed not to use its built-in proxy. That doesn't work - Selenium RC still complains about the Fiddler security certificate. I also tried using the Selenium RC -trustAllSSLCertificates command line option. That solved the Fiddler certificate problem by completely bypassing Fiddler altogether, which of course prevented the capture of any HTTP and HTTPS traffic by Fiddler.
What I would like to happen is the following:
Launch Fiddler
Launch and run the Selenium RC test suite
Fiddler captures all HTTP and HTTPS traffic as the test suite runs
Use FiddlerScript to export specific headers to a file for later analysis (I know how to do this)
Close Selenium
Close Fiddler
It feels like I've almost got this solution working. Does anyone know how to "connect" Fiddler to Selenium RC. BTW - I know that Selenium RC has supposedly been deprecated in favor of Selenium 2.0 WebDriver. However, the Selenium Website says that Selenium RC is still being maintained and is a usable product, within its constraints. I don't have a need to develop this solution in WebDriver, so if it's possible to replace Selenium RC's proxy with Fiddler that's what I prefer to do.
Thanks In Advance For Your Help -
You can use FiddlerCore in your .NET code.
Look here: FiddlerCore API by Telerik
How to record scripts in Selenium RC? As of now, it throws security alerts at me (Trusted certificates), I'm so unable to record it. Please help me, how can we overcome this problem?
You have two options
Start the rc with -trustAllSSLCertificates parameters.Your startup command should look like
java -jar selenium-server-standalone.jar -trustAllSSLCertificates
You should create a firefox profile as mentioned here. Be sure to note down the path where the profile is being created. Then open firefox in that profile (refer the same mozilla support page if you don't how to open FF in a profile) and browse your application. You will have then be prompted to accept certificate. Accept the certificate and close the browser. Now manually open firefox using the newly created profile and access the application one more time. It should not show the certificate error now. All you need to do now is to ask selenium to use this new firefoxprofile. This can be done by using the -firefoxProfileTemplate parameter during selenium server startup
java -jar seleniumserver.jar -firefoxProfileTemplate="Path to firefoxprofile folder"
I'm trying to get Selenium tests to work through PHPUnit. My tests pass in Firefox, but not in IE9. In IE, no matter what combination of settings I've tried, when the Selenium server is running IE will not go directly to the page, and instead displays "There is a problem with this website's security certificate".
If I shut down Selenium, I can use IE to access the site being tested with no problems.
I've tried telling IE that the CyberVillians cert is OK, I've added the cert to IE's list of certs, and tried various Selenium Server command line options.
For what it's worth, I'm using the very latest Selenium and PHPUnit files (downloaded today).
Any ideas?
The solution was indeed to abandon using Selenium RC.
I ended up using chibimagic's Webdriver for PHP, and everything works great. I'll probably end up writing a brokering class to make in interface more like that of PHPUnit_Extensions_SeleniumTestCase. That way, I can work up test scripts using Selenium IDE, using their PHP formatter, and then just paste into my unit test.