browsermob-proxy

har file issue browsermob-proxy with webdriverio

百般思念 提交于 2019-12-11 09:54:11
问题 I was trying to use browsermob-proxy using this and this with webdriverio. It runs fine , but theres no har file generated. I tried changing the below line fs.writeFileSync('stuff.har', data, 'utf8'); to fs.writeFile('/Users/abc/xyz/stuff.har', data, 'utf8'); in the below code (from above links) var Proxy = require('browsermob-proxy').Proxy , webdriverio = require("./node_modules/webdriverio/") , fs = require('fs') , proxy = new Proxy() ; proxy.cbHAR('search.yahoo.com', doSeleniumStuff,

io.netty.handler.codec.TooLongFrameException: HTTP content length exceeded 2097152 bytes. Exception with selenium and browsermob

谁说我不能喝 提交于 2019-12-11 04:44:57
问题 I started seeing below issue recently when i run my tests on chrome browser(selenium) io.netty.handler.codec.TooLongFrameException: HTTP content length exceeded 2097152 bytes. at io.netty.handler.codec.http.HttpObjectAggregator.decode(HttpObjectAggregator.java:241) ~[netty-all-4.0.42.Final.jar:4.0.42.Final] at io.netty.handler.codec.http.HttpObjectAggregator.decode(HttpObjectAggregator.java:89) ~[netty-all-4.0.42.Final.jar:4.0.42.Final] at io.netty.handler.codec.MessageToMessageDecoder

How to know if my Custom HTTP headers are being passed?

风流意气都作罢 提交于 2019-12-10 23:39:28
问题 So, I have been struggling with passing custom HTTP header for some time now. I am creating a script (Python) to Open a URL with Custom headers like {'Referer': 'https://google.com', 'X-Forwarded-For': '47.29.76.109', 'User-Agent': 'Mozilla/5.0 (Linux; Android 7.1.1; CPH1723 Build/N6F26Q; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/67.0.3396.87 Mobile Safari/537.36', 'existing_proxy_port_to_use': '8090'} I have been using BrowserMob-Proxy for this but I am unable to see the

Getting Request And Response Using BrowserMobProxy, Selenium, Firefox, marionette/gecko

你说的曾经没有我的故事 提交于 2019-12-05 21:03:54
I'm trying to get response and request using BMP's RequestFilter and ResponseFilter. However, when the webpage loads, nothing gets printed in the console. Everything else seems to work though. Maybe BMP is not watching GeckoDriver? I'm using Firefox 50.0, BrowserMobProxy 2.1.2, Selenium 3.0.1, and GeckoDriver 0.11.1 The testing code is below. Could someone please help me? Thank you very much! BrowserMobProxy server = new BrowserMobProxyServer(); server.enableHarCaptureTypes(CaptureType.REQUEST_CONTENT, CaptureType.RESPONSE_CONTENT); server.start(); int port = server.getPort(); server

Add ssl certificate to selenium-webdriver

家住魔仙堡 提交于 2019-12-05 00:03:49
I use selenium for end-to-end test with chromeDriver. The websites to test require an ssl certificate. When I manually open the browser, there is a popup that lets me select an installed certificate. Different tests access different URLs and also need different certificates. However, if I run the tests in headless mode, there is no popup. So I need a way to programatically set a certificate (eg. set a .pem file) to be used for the current test. How can I achieve this? I tried setting up a browserMob proxy which I then configured as a proxy in selenium - however, this does not seem to do

BrowserMob Proxy + Selenium: Not receiving any HTTP responses

只愿长相守 提交于 2019-12-04 05:53:09
问题 Maven/Java project with dependencies: <dependencies> <dependency> <groupId>net.lightbody.bmp</groupId> <artifactId>browsermob-core</artifactId> <version>2.1.4</version> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.3.4</version> </dependency> <dependency> <groupId>org

How to fix 'Address already in use' error with browsermob-proxy?

若如初见. 提交于 2019-12-04 05:31:20
问题 I am still trying to use browsermob-proxy (here) to try to monitor the network traffic during a python selenium test (see browsermobproxypy). I am using the following script to test it: from browsermobproxy import Server server = Server("/home/adietz/Projects/Invest/browsermob-proxy/browsermob-proxy-2.1.4/bin/browsermob-proxy") server.start() proxy = server.create_proxy() from selenium import webdriver profile = webdriver.FirefoxProfile() profile.set_proxy(proxy.selenium_proxy()) driver =

BrowserMob Proxy + Selenium: Not receiving any HTTP responses

社会主义新天地 提交于 2019-12-02 10:54:30
Maven/Java project with dependencies: <dependencies> <dependency> <groupId>net.lightbody.bmp</groupId> <artifactId>browsermob-core</artifactId> <version>2.1.4</version> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.3.4</version> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.7.1</version> </dependency>

How to fix 'Address already in use' error with browsermob-proxy?

ぃ、小莉子 提交于 2019-12-02 04:07:29
I am still trying to use browsermob-proxy ( here ) to try to monitor the network traffic during a python selenium test (see browsermobproxypy ). I am using the following script to test it: from browsermobproxy import Server server = Server("/home/adietz/Projects/Invest/browsermob-proxy/browsermob-proxy-2.1.4/bin/browsermob-proxy") server.start() proxy = server.create_proxy() from selenium import webdriver profile = webdriver.FirefoxProfile() profile.set_proxy(proxy.selenium_proxy()) driver = webdriver.Firefox(firefox_profile=profile) proxy.new_har("google") driver.get("http://www.google.co.in"