在自动Web表单填写中替换Selenium工具

时间:2013-09-14 06:02:44

标签: java selenium selenium-webdriver selenium-rc selenium-ide

我正在使用Selenium进行自动网页填写,我正在寻找硒的替代品。请建议我替代硒。

这是selenium的代码

import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
import java.util.regex.Pattern;
import org.openqa.selenium.By;


public class Googletest {
private Selenium selenium;

@Before
public void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*chrome", "https://www.gmail.com/");
    selenium.start();
}

@Test
public void testGoogletest() throws Exception {
selenium.open("/");
selenium.type("//div[@class='email-div']/input", "rashmiujire13@gmail.com");
selenium.type("//div[@class='passwd-div']/input", "xxxxxx");


selenium.click("signIn");
}

@After
public void tearDown() throws Exception {
selenium.stop();
}
}   

1 个答案:

答案 0 :(得分:1)

WebDriver

Selenium - RC已被弃用,并且没有进一步的开发。

相关问题