Tag: firefox

将Firefox嵌入到.NET控件中

我是c#和.net编程的初学者,我想知道我是否可以使用Mozilla Firefox作为webBrowser控件的实例浏览器,因为默认情况下webBrowser控件使用Internet Explorer。

在本地获取Chrome和Firefox版本,C#

我只是使用常规的C#而不是ASP.NET。 我想知道我是否可以获得Chrome和Firefox的版本。 我知道IE可以通过注册表获得版本。 据我所知,Chrome和Firefox不会将这些信息存储在注册表中。 提前致谢。

在C#中使用Selenium WebDriver中的特定Firefox配置文件

我正在尝试使用我已经为seflium 2设置的firefox配置文件,但没有C#的文档。 我试过的代码如下: FirefoxProfileManager profileManager = new FirefoxProfileManager(); FirefoxProfile profile = profileManager.GetProfile(profileName); driver = new FirefoxDriver(profile); 我在Java中看到的代码使用的是使用ProfilesIni而不是FirefoxProfileManager的代码,但这在C#中不可用。 以这种方式设置驱动程序时,使用的selenium配置文件具有所有默认设置,而不是我试图指向的配置文件中指定的设置。 我不确定我是否使用正确的方法来检索配置文件,但如果有人使用Selenium 2和C#,任何信息都会有所帮助。

geckodriver.exe不在当前目录或路径变量中,Selenium 2.53.1 + Firefox 48 + Selenium 3 Beta

看到很多关于Selenium 2.53.1和Firefox 47.0.1的问题,但没有关于Selenium 3 Beta版本的问题。 我正在尝试使用新的gecko / marionette Firefox webdrivers,但即使我有驱动程序位置; 我的环境路径,Firefox在程序中安装文件夹,并在系统环境中给出驱动器位置,它仍然无法正常工作。 错误: geckodriver.exe不存在于当前目录或PATH环境变量的目录中。 该驱动程序可以从https://github.com/mozilla/geckodriver/releases下载。 使用: Selenium 2.53.1服务器 Firefox 48 Selenium 3 Beta DLLs 窗口10 示例代码1 using OpenQA.Selenium.Firefox; public static class FirefoxInitialise { public static IWebDriver Driver {get; set;} Driver = new FirefoxDriver(); } 还尝试了以下内容: using OpenQA.Selenium.Firefox; public static class FirefoxInitialise { public static IWebDriver Driver […]

使用selenium Firefox webdriver将 文本清空

我在Windows 7上使用Firefox 21和C#WebDriver 2.33。我很困惑为什么以下测试失败(我只是检查我的配置设置是否正确)。 这在其他浏览器中传递。 [Test] public void FirefoxDriverWorks() { var firefoxDriver = new FirefoxDriver(); TestGoogleStillExists(firefoxDriver); firefoxDriver.Quit(); } public void TestGoogleStillExists(IWebDriver webDriver) { webDriver.Navigate().GoToUrl(“http://www.google.com”); var title = webDriver.FindElement(By.CssSelector(“head title”)); Assert.That(title.Text, Is.EqualTo(“Google”)); }

尝试使用Nunit运行多个Selenium Webdriver测试失败

我想知道是否有人可以帮助我。 我正在使用selenium Webdriver与C#和Nunit,当我尝试运行多个测试时,我收到以下错误: OpenQA.Selenium.WebDriverException:意外错误。 System.Net.WebException:无法连接到远程服务器—> System.Net.Sockets.SocketException:无法建立连接,因为目标计算机在System.Net.Sockets.Socket上主动拒绝它127.0.0.1:7055 .DoConnect(EndPoint endPointSnapshot,SocketAddress socketAddress) 当我作为个人运行这些测试时,他们正在运行并且传递正常。 任何帮助或指针都会很棒。 下面是我的代码和我的驱动程序类的示例 司机类 using System; using System.Configuration; using OpenQA.Selenium; using OpenQA.Selenium.Chrome; using OpenQA.Selenium.Firefox; using OpenQA.Selenium.IE; namespace SMT.Web.FunctionalTests.Drivers { public class Driver { private static IWebDriver _driver; protected static IWebDriver GetWebDriver { get { if (_driver == null) { string driverConfig = ConfigurationManager.AppSettings[“browser”]; if (!String.IsNullOrEmpty(driverConfig)) { […]

Firefox Quantum获取url(VB.Net/C#)

任何人都知道如何从firefox量程获取url? 我知道firefox: Dim DdeClient As New DdeClient(“Firefox”, “WWW_GetWindowInfo”) DdeClient.Connect() Dim URL As String = DdeClient.Request(“URL”, Integer.MaxValue) DdeClient.Disconnect() URL = Split(URL, “””,”””)(0) URL = Split(URL, “”””)(1)

防止以编程方式缓存脚本

我想问一下是否有办法阻止Firefox缓存脚本(.js文件)。 我有一个项目(ASP.Net Web App)在firefox上有缓存问题。 当我第一次运行应用程序(脚本在firefox上缓存)并修改脚本并重新运行应用程序时,firefox正在使用缓存的脚本而不是更新的脚本。 我正在使用Firefox 3.6.13。 我已经尝试过使用HttpHeaders但似乎firefox忽略了我的代码。 这是我的代码: HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache); HttpContext.Current.Response.Cache.SetAllowResponseInBrowserHistory(false); HttpContext.Current.Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1)); HttpContext.Current.Response.Cache.SetNoStore(); 我尝试将此代码放在global.asax> Application_BeginRequest和MasterPage.aspx.cs> Page_Load中,但它无效。 提前致谢。

如何将浏览器重定向到ASP.NET中的本地文件?

我希望firefox在本地驱动器上打开C:\ somefile.txt 。 我已尝试使用“file:///”前缀的response.redirect,但它只是插入“对象移动到此处”。 进入页面。 我也想对路径进行htmlencode,因为它可能包含特殊的字符… 编辑:要清楚: C:\ somefile.txt是运行浏览器的客户端框上的文件

Selenium 2.53.1在FireFox 48上不起作用

我正在使用selenium来测试我们的网站。 当我构建项目时,有一个exception: – OpenQA.Selenium.WebDriverException:无法在45000毫秒内启动套接字。 尝试连接到以下地址:127.0.0.1:7055,问题来自代码 IWebDriver driver = new FirefoxDriver(); 谁知道如何解决这个问题?