1.硬性等待 Thread.sleep(8000); 所谓的硬性等待就是,执行完相应操作就等待我设置的8s.无论网速快与慢,网速快的话,也许5s就打开网页了,可是程序必须接着等待剩下的3秒. 网速慢的话,也许8s之内没有打开,此时执行下一步操作,会由于找不到元素,而fail case,所以非必要情况下,不要使用此等待方法. 2.智能等待 public void waitForElementToLoad(int timeOut, final By By) { try { (new WebDrive
在写代码的时候应该注意: 1.标签闭合 2.标签小写 3.不能随意嵌套 提高被搜索引擎搜到几率: mate中的name变量[其中keywords和description尤其重要] Meta name=”Kyewords”Lang=”EN”Content=”vacation,greece,sunshine” Meta name=”Description” Content=”你网页的简述” Meta name=”Robots” Content=”All|None|Index|Noindex|Foll