我是Selenium的新手,想知道是否有人能指出我正确的方向。InternetExplorerDriver getPageSource()返回的字符串不同于FirefoxDriver
我想获取页面的页面源,但我注意到IE驱动程序返回的东西 不同于FirefoxDriver。
此外,InternetExplorerDriver.getPageSource()返回的字符串与我在IE上单击查看页面源时看到的字符串不同。
我运行IE 8和Firefox 22
对于样品此页上:http://stackoverflow.com/questions/16455217/webdriver-save-the-location-of-the-id-in-the-page
当我打电话getPageSource(),IE返回类似这样的。
"<HTML><HEAD><TITLE>selenium - Webdriver/Save the location of the ID in the page - Stack Overflow</TITLE><LINK rel="shortcut icon" href="https://cdn.sstatic.net/stackoverflow/img/favicon.ico"><LINK rel="apple-touch-icon image_src" href="https://cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png">
虽然Firefox返回了这个。
"<!DOCTYPE html>
<title>selenium - Webdriver/Save the location of the ID in the page - Stack Overflow</title>
<link href="https://cdn.sstatic.net/stackoverflow/img/favicon.ico" rel="shortcut icon" />
<link href="https://cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png" rel="apple-touch-icon image_src" />
是否有IEDriver的方式相同的方式为FirefoxDriver返回pageSource?