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. Selênio Controle Remoto (RC) é uma ferramenta que permite que você teste a escrever aplicações web UI testes automatizados em muitas línguas programação HTTP contra qualquer site utilizando qualquer mainstream JavaScript-enabled browser. Selenium RC is a powerful and simple framework for running (scheduled or manually) automated UI centric regression tests for web applications / services. Selênio RC é uma poderosa e simples quadro de correr (programada ou manualmente) automatizado UI centric regressão testes de aplicações web / serviços. Here are few simple tips for Selenium RC java client. Aqui estão algumas dicas simples para Selénio RC java cliente. I used JUnit for tests. Eu costumava JUnit para testes. You can use NGUnit too. Você pode usar NGUnit também.

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. Para executar o cliente Java você precisa apenas ter selênio-java-client-driver.jar (localizado em selenium-remote-control-1.0-beta-1/selenium-java-client-driver-1.0-beta-1), em seu classpath.

2. The automatically generated java file (from Selenium Core) is likely to be defective. O arquivo gerado automaticamente java (a partir de Selênio Core) é susceptível de ser defeituoso. Ensure at least you have the following import statements: Assegurar, pelo menos, você tem as seguintes declarações importação:

import com.thoughtworks.selenium.*; importação com.thoughtworks.selenium .*;
import junit.framework.*; importação junit.framework .*;
import java.util.regex.Pattern; java.util.regex.Pattern importação;

3. Ensure that the saved file name matches the generated class file name. Assegurar que o arquivo salvo nome coincide com o nome do arquivo gerado classe.

4. Remove the package statement or replace it with your own package statement. Remover o pacote declaração ou substituí-la com seu próprio pacote declaração. Initially just remove it. Inicialmente apenas removê-lo.

5. Error: java.lang.UnsupportedOperationException: Catch body broken: IOException from cmd=setContext&1=SeleniumSTSanityTest.testSimpleThoughts -> java.net.ConnectException: Connection refused Erro: java.lang.UnsupportedOperationException: Catch corpo quebrado: IOException de setContext & cmd = 1 = SeleniumSTSanityTest.testSimpleThoughts -> java.net.ConnectException: Conexão recusada

Have you run the Selenium server? Selênio ter você executar o servidor?
Run the Selenium server like this: Selênio correr o servidor desta forma:
java -jar selenium-server.jar java-jar selênio-server.jar

The selenium server is located in: O selênio servidor está localizado em:
selenium-remote-control-1.0-beta-1/selenium-server-1.0-beta-1

6. Error: com.thoughtworks.selenium.SeleniumException: ERROR Server Exception: sessionId should not be null; has this session been started yet? Erro: com.thoughtworks.selenium.SeleniumException: Erro de Servidor Exceção: sessionId não deve ser nulo; esta sessão tenha sido iniciado ainda?

Ensure that the browser is in the PATH before running the server. Assegurar que o navegador está no caminho antes de executar o servidor. On my linux box I did: Em minha casa linux eu fiz:
export PATH=$PATH:/usr/lib/firefox-2.0.0.6/ exportação PATH = $ PATH: / usr/lib/firefox-2.0.0.6 /

7. Error: com.thoughtworks.selenium.SeleniumException: Permission denied to get property Location.href Erro: com.thoughtworks.selenium.SeleniumException: Permissão negada para obter bens 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). Isso acontece em Firefox, quando uma página anterior não foi totalmente carregado antes da próxima página foi invocado (devido ao tempo limite ou clique () foi utilizado). The solution is to use *chrome instead of *firefox in setup. A solução é usar o cromo * * firefox, em vez de configuração. I use for firefox: Eu uso para Firefox:
setUp(”http://blog.taragana.com/”, “*chrome”); Configuração ( "http://blog.taragana.com/", "* cromo");

8. Timeout error Timeout error
Increase the time in selenium.waitForPageToLoad() to 60000 (1 minute) or more. Aumente o tempo em selenium.waitForPageToLoad () para 60000 (1 minuto) ou mais.

9. How to run the generated java Test file? Como executar o arquivo gerado java Teste?
This is really a JUnit question but in short you can add the following code in the generated file to get it running: Esta é realmente uma questão JUnit, mas em breve você poderá adicionar o código a seguir no arquivo gerado para obtê-lo correr:

 public static Test suite() {  return new TestSuite( SeleniumSTSanityTest .class); }  public static void main(String args[]) {  junit.textui.TestRunner.run(suite()); } public static Test suite () (retorno novo TestSuite (SeleniumSTSanityTest. classe);) public static void main (String args []) (junit.textui.TestRunner.run (suite ());) 

Note: Replace SeleniumSTSanityTest with the name of your Java source file (without the .java extension) Observação: Substitua SeleniumSTSanityTest com o nome do seu arquivo fonte Java (sem o. Extensão java)