大神帮帮忙
最近自学selenium自动化测试,按照网上的教程搭建了一个测试环境(Java+eclipse),满怀激动地测试了一下,录制的网页很简单,就是打开百度,搜索“你好”。代码如下:package com.test;
import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class test {
private Selenium selenium;
@Before
public void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*iexplore", "https://www.baidu.com/");
selenium.start();
}
@Test
public void Test() throws Exception {
selenium.open("/");
selenium.click("id=kw");
selenium.type("id=kw", "你好");
selenium.click("id=su");
}
@After
public void tearDown() throws Exception {
selenium.stop();
}
}
但是在eclipse上弹不出百度网页来,弹出脚本错误的对话框。C:\Users\media\Desktop\捕获.png
往懂行的帮帮忙 :(:(:(:(:(:(:( 错误提示如下
:Q:Q
页:
[1]