我正在使用 Selenium 进行自动 Web 表单填写,我正在寻找硒的替代品。请向我推荐硒的替代品。
这是硒的代码
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();
}
}