第二篇 没有第一篇给力啊。 再修改修改,放上关键性代码分析。 @testly
#6 楼 @chenhengjie123 升级你的 Safari
为啥我感觉你的发帖都是一模一样呢?
你可以把下载地址也放上来啊 @mingway_hu
我用 docker 搭建了 ELK。感觉如果不熟练的话,效率还是很低的。。
这个的使用场景讲下呗
#65 楼 @vigossjjj 争取做成一个好项目!
#1 楼 @chenhengjie123 图是测试发图发不出的 bug。
这个帖子也顶下,另外可以用 chromedriver 来自动化模拟。
package com.testerhome;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.DesiredCapabilities;
import java.util.HashMap;
import java.util.Map;
import static org.junit.Assert.assertTrue;
/**
* Created by lihuazhang on 15/4/4.
*/
public class ChromeMobileEmulatorTest {
private WebDriver driver;
@Before
public void createDriver() {
Map<String, String> mobileEmulation = new HashMap<String, String>();
mobileEmulation.put("deviceName", "Google Nexus 5");
Map<String, Object> chromeOptions = new HashMap<String, Object>();
chromeOptions.put("mobileEmulation", mobileEmulation);
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);
driver = new ChromeDriver(capabilities);
}
@After
public void quitDriver() {
driver.quit();
}
@Test
public void testBaiduSearch() throws InterruptedException {
driver.get("http://www.baidu.com");
Thread.sleep(5000); // Let the user actually see something!
WebElement searchBox = driver.findElement(By.name("word"));
searchBox.sendKeys("ChromeDriver");
searchBox.submit();
Thread.sleep(5000); // Let the user actually see something!
assertTrue(driver.getPageSource().contains("ChromeDriver"));
driver.quit();
}
}
我是来顶帖子的!有些细节好像不对。
#11 楼 @zoo4778362 不招了吧?
@wenchao
➜ Desktop python test.py
result_20150512111752.html
.
Time Elapsed: 0:00:06.288321
➜ Desktop
测试通过。和你的脚本一抹一眼,除了把退格改成了 backspace