02 2016 档案
摘要:1.获取执行js代码后的返回值 //获取滚动距离 String jl="return $('#chapterul li').height();"; Long jlhq=(Long)((JavascriptExecutor)driver).executeScript(jl); //int jlint=
阅读全文
摘要:1.想要获取固定ul下所有li的个数 如下图: //获取ul下li的个数 List<WebElement> elements = driver.findElement(By.id("firstulid")).findElements(By.tagName("li")); System.out.pri
阅读全文
摘要:环境准备: 1.下载所学安装包: setuptools https://pypi.python.org/packages/2.7/s/setuptools/ selenium https://pypi.python.org/pypi/selenium 2.安装 1).安装setuptools (注意
阅读全文
摘要:1.查看网页的cookie信息 1 //查看cookie 登录后的cookie 2 Set<Cookie> setcoke= driver.manage().getCookies(); 3 for(Cookie str: setcoke){ 4 System.out.println("cookie=
阅读全文
摘要:1.今天遇到个奇葩问题,iframe有两个id相同的(如下图) 使用driver.switchTo().frame(“frmLinkPage1”);这个无法使用了。 后来改用driver.switchTo().frame(0);就可以用了 顺便在提一下退出ifrmae driver.switchTo
阅读全文

浙公网安备 33010602011771号