Articles of selenium

使用模拟来启动进程(间接)在C#

我正在使用Selenium控制浏览器的应用程序。 Selenium在初始化时启动浏览器,因此我从不直接在浏览器的.exe中调用Process.Start。 我希望Selenium及其所有subprocess在不同于我的应用程序的用户下运行(因为我不希望它有权访问我的源代码)。 使用这里find的模拟样本,我试图用模拟包装Selenium代码,但似乎所有的subprocess都启动与启动他们的父进程的用户。 有谁知道一种方法来包装用户模拟代码块,并具有模拟用户的权限启动所有subprocess? 如果不是的话,那么实现这一目标的最佳策略是什么? 在另一个进程中运行所有的Selenium逻辑,并以某种方式pipe理命令?

试着用selenium webdriver在linux上启动chrome驱动程序

我试图find答案,不能,现在我自己问。 我写了简单的testing from selenium import webdriver driver = webdriver.Chrome(executable_path=r"/home/tranter/workspace/chromedriver") driver.get("http://www.python.org") driver.close() 比我有回溯 > tranter@tranter-VirtualBox:~/workspace$ python testchrome.py Traceback > (most recent call last): File "testchrome.py", line 6, in <module> > driver = > webdriver.Chrome(executable_path=r"/home/tranter/workspace/chromedriver") > File > "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", > line 65, in __init__ keep_alive=True) File > "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", > line 73, in __init__ self.start_session(desired_capabilities, > browser_profile) File […]

在Windows上运行Jenkins的Seleniumtesting期间,如何在未实际login到机器时捕获屏幕截图?

Jenkins在Windows(XP和/或Windows 7)虚拟机上运行一个Seleniumtesting套件,我们有一个CI环境。 如果我没有通过RDP物理login到运行这些testing的虚拟机,我所看到的只有黑色(空白)PNG。 我已经尝试了多个Selenium RC 2ish版本(例如2.0b2,2.0rc3,2.0.0,2.1.0)的所有“捕获”方法(基于64位编码和基于文件),我也得到了相同的结果我试过的一切。 是否有其他人在Windows CI部署中运行Selenium并能够捕获屏幕? 或者更好地说,任何人都可以阐明如何使用Selenium API捕获Windows中的屏幕,而不必在实际的框中“?

如何将Selenium Firefox(IDE)testing移植到其他浏览器? (视窗)

我用firefox上的selenium IDE插件写了不lesstesting用例。 我现在想在其他浏览器上运行这些testing。 据我所知,没有类似的插件,所以我可以不得不使用selenium驱动程序。 现在我的问题是:我应该如何导出和编写这些testing用例? 我正在运行Windows,否则我会导出到ruby。

被要求使用Selenium来testingWindows桌面应用程序界面 – 这怎么可能?

我申请的一个公司给了我一个“testing”,我不得不拒绝,因为它没有太多的意义:他们要求我使用Selenium来testingWin桌面应用程序的GUI,并以表格的forms生成错误报告。 他们声称他们正在使用Selenium在公司testingWin桌面应用程序,但是他们不知道如何。 我做了一些研究,我的理解是Selenium只能用于Web浏览器,因为它是专门为此devise的。 它如何连接到Windows桌面应用程序? 我只是没有看到任何可能的方式。 我发现有人声称有人将它与另一个开源工具集成在一起,但这个“testing”应该花费我1个小时的时间,安装一些其他的框架,configuration,与Selenium集成等等,绝对不会落入一小时的时间范围内。 我也从另一家公司那里听说,他们希望我使用Selenium来自动化非浏览器的东西,如果他们雇用我的话……仍然没有线索 – 这甚至有可能吗? – 或者这是错的吗?

selenium – 节点服务的更改分辨率

我在windows server 2012 R2上使用Selenium 3.01 。 testing通过webdriver远程运行。 问题是当一个节点作为服务运行时,分辨率太小而且testing保持失败。 当作为一个进程运行节点login时,一切都很好,因为分辨率要好得多。 在发生故障时我可以看到很大的区别。 我怎样才能改变分辨率? Driver.set_windowsize(x,y) 要么 Driver.maximize_window() 没有工作,因为服务器的分辨率较小。 有任何想法吗? 谢谢

selenium作为本地系统用户运行时与铬问题

3我正在使用selenium-server-standalone-2.33.0.jar来启动seleniumtesting套件。 我有一个testing套件,在Firefox和Internet Explorer中运行得非常好。 当我尝试在Google Chrome中运行它时,它对当前用户运行良好。 当我尝试从本地系统用户运行testing(打开以本地系统用户身份运行的命令窗口)时,testing失败给我一个Windowsregistryexception。 这是我试图运行的命令: java -jar selenium-server-standalone-2.33.0.jar -port 5885 -htmlsuite "*googlechrome" "http://www.google.com" "TestSuite.html" "results.html" 这是我得到的exception: HTML suite exception seen: java.lang.RuntimeException: org.openqa.selenium.os.WindowsRegistryException: Problem while managing the registry, OS Version '6.1', regVersion1 = false Build info: version: '2.33.0', revision: '6c40c18', time: '2013-04-09 17:22:56' System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_38' […]

seleniumIEDriver问题启动IE NoSuchWindowException

org.openqa.selenium.NoSuchWindowException: Unable to get browser (WARNING: The server did not provide any stacktrace information)Command duration or timeout: 16 millisecondsBuild info: version: '2.25.0', revision: '17482', time: '2012-07-18 21:08:56'System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_07'Driver info: driver.version: EventFiringWebDriverSession ID: c1d95c8f-b182-4f96-a9f9-ed67f68b0bc9Command duration or timeout: 190 millisecondsBuild info: version: '2.25.0', revision: '17482', time: '2012-07-18 22:18:01'System […]

在Windows 10机器上运行的应用程序无法find文件

我有一个应用程序在Linux机器上使用chromedriver ,我把应用程序切换到Windows 10机器。 现在突然它告诉我,它无法findchromedriver文件。 这是错误的: Selenium::WebDriver::Error::WebDriverError in Static#home Showing C:/Users/User/Documents/test_app/app/views/static/home.html.erb where line #4 raised: Unable to find chromedriver. Please download the server from http://chromedriver.storage.googleapis.com/index.html and place it somewhere on your PATH. More info at https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. 我将chromedriver文件放在我的Linux机器上的相同位置,就在应用程序的主文件夹中。 在这种情况下,path是C:\Users\User\Document\test_app 。 Windows解释path不同于Linux? 该chromedriver是最新的版本 。 它的标题是“chromedriver_win32.zip”。 “赢”意味着Windows。 “32”是否意味着它是一个32位系统? 我的机器是64位的。

如何在Eclipse中添加Apache POI库 – 对于Selenium Webdriver项目?

我需要将apache poi添加到我的项目(我需要hssf,ss和xssf)。 我从互联网上下载了一个jar文件,但是它不包含xssf。 我去了http://poi.apache.org/ ,我下载了这个: http : //www.apache.org/dyn/closer.cgi/poi/release/src/poi-src-3.9-20121203.zip ,我解压缩它,并得到了消除。 我尝试了第1部分,但那只是为了JavaDoc。 我应该如何从这里出发?