我现在有几天搜索了这个,并没有找到一个很好的资源。

我想为硒网设置两个任务,在Conemu中为“只需点击一下”。我添加了一个任务并设置了一个启动dir(硒网格jar所在的地方)。

根据 http://code.google.com/p/selenium/wiki/ grid2 我需要用不同的参数开始两个jar的实例:

java -jar selenium-server-standalone-2.14.0.jar -role hub
.

java -jar selenium-server-standalone-2.14.0.jar -role node  -hub http://localhost:4444/grid/register
.

我想在康塞中有两个任务,开始这两个硒的实例。我试图用

设置一个任务
-new_console:d:D:\Downloads\Programming\Selenium

java -jar selenium-server-standalone-2.14.0.jar -role hub
.

这始终导致我遵循Conimu的输出

Error: Unable to access jarfile selenium-server-standalone-2.14.0.jar

Current directory:
C:\Program Files\ConEmu\ConEmu

Command to be executed:
"C:\Windows\system32\java.exe" -jar selenium-server-standalone-2.14.0.jar -role hub

ConEmuC: Root process was alive less than 10 sec, ExitCode=1.
Press Enter or Esc to close console...
.

在任务中,它不会打开源路径。删除任务中的参数时的JAR时,将打开一个新的控制台并导航到正确的文件夹。

我完全丢失了这里 - 如何设置任务自动运行Selenium网格?

编辑1:我添加了当前设置的屏幕截图( - > http:// tinyurl .com / q2mgkmx [正如我没有足够的声誉,我用tinyull改变了stackoverflow网址;没有什么可怕的;)])。我知道这是错误的,因为新行中的每个条目都在Conemu打开一个新标签。但我认为“>”参数将标记为“当前标签”...

编辑2:只是完整性:我在Windows 7上运行64位客户端。

有帮助吗?

解决方案 2

I found a solution! yay

Screenshot of working hub and node: http://tinyurl.com/njkszq6 (Stackoverflow image)

I don't know if this might work better if set up in another way, but this should be fine for now. This is the setup I twiddled together from various sources:

>cmd /k color 4C & cd /d "D:\Downloads\Programming\Selenium" -cur_console:t:Hub & java -jar selenium-server-standalone-2.40.0.jar -role hub

>cmd /k RenameTab "Node" & color 2A & cd /d "D:\Downloads\Programming\Selenium" -cur_console:s1TVn & java -jar selenium-server-standalone-2.40.0.jar -role node

Screenshot of ConEmu setup: http://tinyurl.com/pnfyta5 (Stackoverflow image)

This opens both console windows on top and bottom of ConEmu. I added color to both windows. And they both start the respective hub and node of Selenium.

I still don't know why Maximus' line of code did not do the magic trick. But it was a really good hint on where to head to.

@Maximus: If you can shed some light into this, I would appreciate it greatly!

Edit: I added Maximus' hints to the setup.

其他提示

java -jar selenium-server-standalone-2.14.0.jar -role hub -new_console:d:D:\Downloads\Programming\Selenium
.
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top