문제

So using grid 2, is there a configuration file to start up xvfb or xvnc each time selenium RC begins. Hub and Selenium RC is already installed on separate linux boxes.

In addition, is there a way to implement bidirectional communicate between the selenium test running on RC and the client (Java client software)? For ex) test fails because element cannot be found on a page, client needs to be notified and client can provide the correct element.

so the selenium web driver test should not stop, instead wait until the correct input or client terminates the test. sort of like a feedback cycle in order to make sure that all variations on an web application is accounted for. ex) a form button with randomly generated ID, relying on xpath which breaks randomly on certain pages.

Is it possible to achieve continuous integration through specifying regular time intervals in which the selenium grid 2 will boot up the rc?

Does this mean, I need to extend the webdriver test as also a Jetty server? or Netty? Start a selenium webservice instead?

도움이 되었습니까?

해결책

To answer your first question, I would recommend always having the Xvfb server running on your RC nodes. If you're running debian or ubuntu, you could also start your RC nodes with xvfb-run:

nohup xvfb-run java -jar selenium-server-standalone-2.0rc2.jar \
      -role rc \
      -port 5555 \
      -hub http://hub:4444/grid/register 2>&1 > selenium-rc.log &

Regarding bidirectional communication. Why not just use the isElementPresent() api call and handle this logic in the test? More complex interactions could be achieved by extending selenium with help of user-extensions.js and the getEval() api call.

Example of using getEval() api call

Starting and stopping RC nodes is not supported by the hub. The purpose of the hub is to mediate requests from selenium clients to active RC nodes. If you can't have the RC nodes always running, then you could look at cron.

다른 팁

Selenium Grid is simply a way to manage a group of Selenium servers and simplify client dispatching to those servers. If you're unable to do something using a Selenium Server directly, you will not be able to do with grid either. Likewise, if you can do with Selenium Server, you can do it with grid.

So, if you want an interactive script, that'll work, but that's all being driven from the client. There's no way for the Selenium Server to call back into your application.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top