Tag: firefox

是否可以在Firefox或Chrome中查看post请求的数据?

如何通过配置,扩展程序或代码截取页面在FF或Chrome中发送的post数据? (代码部分使这个编程相关。;) 我目前使用Wireshark / Ethereal,但它有点难以使用。

Google Chrome的ASP.NET MVC Session.IsNewSession问题

我正在为我的ASP.NET 3.5 MVC 2项目编写一个Session过期的逻辑片段来注销用户并将它们重定向到AccountController LogOn操作。 我对所有关心会话状态的操作都有以下属性,这段代码适用于IE 8,但不适用于Firefox 4或Google Chrome 10.症状是当我尝试导航到由操作表示的视图时我的[SessionExpireFilter]属性,下面代码中的ctx.Session.IsNewSession属性每次都评估为“true”,即使我在30分钟的会话中只有几秒钟。 public class SessionExpireFilterAttribute : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext filterContext) { HttpContext ctx = HttpContext.Current; // check if session is supported if (ctx.Session != null && ctx.Session.IsNewSession) { // If it says it is a new session, but an existing cookie exists, then it […]

无法在45000内启动套接字

我正在使用FF版本19 它一切正常,直到昨天,突然今天早上我开始得到这个错误,我有与之前运行的相同的确切代码,没有任何改变 错误信息: Test ‘M:.TestCases.12’ failed: Failed to start up socket within 45000 OpenQA.Selenium.WebDriverException: Failed to start up socket within 45000 at OpenQA.Selenium.Firefox.Internal.ExtensionConnection.ConnectToBrowser(Int64 timeToWaitInMilliSeconds) at OpenQA.Selenium.Firefox.Internal.ExtensionConnection.Start() at OpenQA.Selenium.Firefox.FirefoxDriver.StartClient() at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxBinary binary, FirefoxProfile profile, TimeSpan commandTimeout) at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxBinary binary, FirefoxProfile profile) at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxProfile profile) 0 passed, 1 failed, 0 skipped, took […]

在Chrome或Firefox上使用Visual Studio 2015调试Java脚本

我可以毫无问题地使用IE进行调试,但是当我尝试不同的浏览器时,代码并没有在断点上停止。 我有一个目前与IE不兼容的项目。 我在项目中使用OpenJSCAD作为依赖项,因此我需要在Chrome或Firefox上进行调试。 是否可以在Chrome或Firefox上使用Visual Studio 2015调试Java Script?

如何使用C#在Firefox中启动特定的URL

我正在尝试使用Firefox启动特定的URL。 但我只能打开Firefox浏览器而无法启动该URL。 class BrowserHelper { IWebDriver driver; string path = Path.Combine(Environment.CurrentDirectory, @”gecko\\”); public void Navigate(string url) { path = path.Replace(@”\”, @”\\”); var driverService = FirefoxDriverService.CreateDefaultService(path); driverService.HideCommandPromptWindow = true; if (driver == null) { driver = new FirefoxDriver(driverService); } driver.Url = url; driver.Navigate().GoToUrl(driver.Url); driver.Manage().Window.Maximize(); } } class Realtest { BrowserHelper BH = new BrowserHelper(); public void […]

当我运行seleniumunit testing时Firefox崩溃

我开始使用Selenium.WebDriver(v2.45)来运行可视化测试。 作为网络驱动程序,我使用FirefoxDriver 。 我安装了Firefox 38.当我尝试运行test firefox返回exception时带有消息: FF已停止工作。 有没有人有什么建议? 它在上周工作,我的测试是否有可能被更新崩溃? Problem signature: Problem Event Name: APPCRASH Application Name: Firefox.exe Application Version: 38.0.1.5611 Application Timestamp: 55540a1a Fault Module Name: xul.dll Fault Module Version: 38.0.1.5611 Fault Module Timestamp: 55541969 Exception Code: c0000005 Exception Offset: 0035669b OS Version: 6.3.9600.2.0.0.16.7 Locale ID: 1033 Additional Information 1: 5861 Additional Information 2: […]

Firefox中使用WebDriver和C#的不受信任的SSL证书

更新:我升级到Selenium 2.37,但仍然有同样的问题! 最新编辑:定义pref后仍然无法工作(见下文) //some more prefs: profile.SetPreference(“network.http.phishy-userpass-length”, 255); profile.SetPreference(“network.automatic-ntlm-auth.trusted-uris”, _url); profile.SetPreference(“webdriver_assume_untrusted_issuer”, true); profile.SetPreference(“webdriver_accept_untrusted_certs”, true); profile.SetPreference(“trustAllSSLCertificates”, true); 我正在使用FF 25.0.1 Webdriver版本:2.31 我以前从来没有遇到过这个问题,但刚开始运行我的自动化测试用例时,发生的事情就是我得到了SSL认证错误,即使我已经接受并添加为例外但我仍然得到错误,因此我的测试案件失败…… 这是我在构建ff webdriver时添加的内容… FirefoxProfile profile = new FirefoxProfile(); profile.SetPreference(“network.http.phishy-userpass-length”, 255); profile.SetPreference(“network.automatic-ntlm-auth.trusted-uris”, _url); profile.SetPreference(“webdriver_assume_untrusted_issuer”, false); drv = new FirefoxDriver(profile); 屏幕截图。

WatiN FireEvent不在FireFox中传递事件属性

这已被记录为sourceforge中的一个错误,但现已删除。 我正在使用FireFox 3.6和相关的jssh。 我可以在Firebug中看到事件属性没有被设置。 我正在尝试拖放下面的代码 var mouseDownEvent = new NameValueCollection {{“button”, “1”}, {“clientX”, “0”}, {“clientY”, “0”}}; firstStoryRow.FireEventNoWait(“onmousedown”, mouseDownEvent); 有传递这些属性的变通方法但不是很好。 有人知道这是否是WatiN中的真正限制或者我做错了什么?

使用UI自动化获取Firefox URL

我试图使用以下代码在Firefox中获取URL的值。 问题是它只返回“搜索或输入地址”(参见下面的Inspect.exe树结构)。 看起来我需要降低一级。 有人可以告诉我如何做到这一点。 public static string GetFirefoxUrl(IntPtr pointer) { AutomationElement element = AutomationElement.FromHandle(pointer); if (element == null) return null; AutomationElement tsbCtrl = element.FindFirst(TreeScope.Subtree, new PropertyCondition(AutomationElement.NameProperty, “Search or enter address”)); return ((ValuePattern)tsbCtrl.GetCurrentPattern(ValuePattern.Pattern)).Current.Value as string; } 对于树结构,请参阅:

c#Selenium 2.53在firefox升级到47之后移动到牵线木偶驱动程序

我正在尝试使用selenium进入升级的firefox Web浏览器自动化。 似乎selenium需要木偶司机才能继续工作。 我按照开发人员的指示, 下载了驱动程序 将其重命名为wires.exe 以下代码没有设法将PATH正确设置为自定义路径。 System.Environment.SetEnvironmentVariable(“webdriver.gecko.driver”,“@ C:\ DOWNLOADS \ wires.exe”) 所以我将wires.exe添加到debug \ bin文件夹,然后wires.exe正常工作,但我得到以下错误 捕获到System.InvalidOperationException消息=未找到实体Source = WebDriver 这是我用来启动webdriver的代码 FirefoxOptions option1 = new FirefoxOptions(); option1.IsMarionette = true; option1.AddAdditionalCapability(“marionette”, true); driver = new FirefoxDriver(option1);