Selenium Remote Control (RC) is a test tool that allows you to write automated web application UI tests in many programming languages against any HTTP website using any mainstream JavaScript-enabled browser. 셀레늄 원격 제어 (이끌고)는 테스트 도구를 사용하면 자동으로 웹 응용 프로그램을 작성 ui http 웹 사이트에 대해 테스트를 대부분의 프로그래밍 언어로 자바 스크립트 - 활성화된 브라우저를 사용하는 주류합니다. Selenium RC is a powerful and simple framework for running (scheduled or manually) automated UI centric regression tests for web applications / services. 셀레늄 이끌고는 강력하고 단순 프레임 워크를 실행 (예정 또는 수동으로) 회귀 테스트를 중심 웹 응용 프로그램을 자동으로 ui / 서비스합니다. Here are few simple tips for Selenium RC java client. 다음은 몇개의 단순한 힌트 셀레늄 이끌고 자바 클라이언트합니다. I used JUnit for tests. 나는 junit에 대한 테스트를 사용합니다. You can use NGUnit too. ngunit도 사용할 수있습니다.

1. To run the Java client you need to only have selenium-java-client-driver.jar (located in selenium-remote-control-1.0-beta-1/selenium-java-client-driver-1.0-beta-1 ) in your classpath. 자바 클라이언트를 실행해야합니다 셀레늄 밖에 없다 - 자바 - 클라이언트 - driver.jar (위치 selenium-remote-control-1.0-beta-1/selenium-java-client-driver-1.0-beta-1)에서 귀하의 클래스합니다.

2. 두합니다. The automatically generated java file (from Selenium Core) is likely to be defective. 자바 파일을 자동으로 생성됩니다 (셀레늄 코어)가 결함있는 것으로 보인다. Ensure at least you have the following import statements: 적어도 당신은 다음과 수입 보장 문 :

import com.thoughtworks.selenium.*; 수입 com.thoughtworks.selenium .*;
import junit.framework.*; 수입 junit.framework .*;
import java.util.regex.Pattern; 수입 java.util.regex.pattern;

3. 3합니다. Ensure that the saved file name matches the generated class file name. 저장된 파일 이름을 확인합니다 생성된 클래스 파일 이름과 일치합니다.

4. 사. Remove the package statement or replace it with your own package statement. 이 패키지를 제거하여 자신만의 패키지를 바꾸십시오 진술 또는 진술합니다. Initially just remove it. 처음에 그냥 제거합니다.

5. 오. Error: java.lang.UnsupportedOperationException: Catch body broken: IOException from cmd=setContext&1=SeleniumSTSanityTest.testSimpleThoughts -> java.net.ConnectException: Connection refused 오류 : java.lang.unsupportedoperationexception : 캐치 몸이 부서지는 : cmd = setcontext & 1 = ioexception에서 seleniumstsanitytest.testsimplethoughts -> java.net.connectexception : 연결이 거부됨

Have you run the Selenium server? 셀레늄 서버를 실행하는가?
Run the Selenium server like this: 이렇게 셀레늄 서버를 실행합니다 :
java -jar selenium-server.jar 자바 - 병 셀레늄 - server.jar

The selenium server is located in: the 셀레늄 서버가 위치한 :
selenium-remote-control-1.0-beta-1/selenium-server-1.0-beta-1

6. 6합니다. Error: com.thoughtworks.selenium.SeleniumException: ERROR Server Exception: sessionId should not be null; has this session been started yet? 오류 : com.thoughtworks.selenium.seleniumexception : 오류 서버 예외 : sessionid가되지 않습니다 널;은이 세션이 아직 시작?

Ensure that the browser is in the PATH before running the server. 브라우저가 있는지 확인합니다을 실행하기 전에 서버의 경로합니다. On my linux box I did: 내 리눅스 상자에 난 :
export PATH=$PATH:/usr/lib/firefox-2.0.0.6/ 수출 경로를 = $ 경로 : / usr/lib/firefox-2.0.0.6 /

7. Error: com.thoughtworks.selenium.SeleniumException: Permission denied to get property Location.href 오류 : com.thoughtworks.selenium.seleniumexception : 사용 권한이 거부를 재산 location.href

This happens on Firefox when a previous page wasn’t fully loaded before the next page was invoked (due to timeout or click() was used). firefox 때이 문제를 완전히로드하기 전에 이전 페이지로 다음 페이지로가는 호출 (클릭으로 인해 시간을 제한하거나 ()를 사용). The solution is to use *chrome instead of *firefox in setup. 해결 방법은 firefox를 사용 * * 크롬 대신에 설치합니다. I use for firefox: 나는에 사용 firefox :
setUp(”http://blog.taragana.com/”, “*chrome”); 설치 프로그램 ( "http://blog.taragana.com/", "* 크롬");

8. Timeout error 시간 초과 오류
Increase the time in selenium.waitForPageToLoad() to 60000 (1 minute) or more. 시간을 늘리는 selenium.waitforpagetoload ()를 60000 (1 분) 이상합니다.

9. How to run the generated java Test file? 자바 테스트 파일 생성을 실행하는 방법?
This is really a JUnit question but in short you can add the following code in the generated file to get it running: 요컨대 이것은 정말 junit 질문을하고 싶지만 다음과 같은 코드를 추가하실 수있습니다 잡아 생성된 파일을 실행한다 :

 public static Test suite() {  return new TestSuite( SeleniumSTSanityTest .class); }  public static void main(String args[]) {  junit.textui.TestRunner.run(suite()); } 공공 정적 테스트 스위트 () (반환 새로운 테스트 제품군 (seleniumstsanitytest합니다. 클래스);) 공공 정적 무효 메인 (문자열 args []) (junit.textui.testrunner.run (스위트 룸 ());) 

Note: Replace SeleniumSTSanityTest with the name of your Java source file (without the .java extension) 참고 사항 : 귀하의 이름을 바꾸기로 seleniumstsanitytest 자바 소스 파일 (없이는합니다. 자바 확장)