您的位置:軟件測試 > 開源軟件測試 > 開源功能測試工具 > Selenium
輕松自動(dòng)化---selenium-webdriver(python) (十四)
作者:網(wǎng)絡(luò)轉(zhuǎn)載 發(fā)布時(shí)間:[ 2013/9/16 10:02:59 ] 推薦標(biāo)簽:

  創(chuàng)建新session
  10:20:38.593 INFO - Executing: [new session: {platform=ANY, javascriptEnabled=tr
  ue, browserName=chrome, version=}] at URL: /session)
  10:20:38.593 INFO - Creating a new session for Capabilities [{platform=ANY, java
  scriptEnabled=true, browserName=chrome, version=}]  

  webdrivr通過GET方式發(fā)送請求
  [0.921][INFO]: received Webriver request: GET /status 

  向webdrver返回響應(yīng),返回碼200表示成功
  [0.921][INFO]: sending Webriver response: 200 {
   "sessionId": "",
   "status": 0,
   "value": {
      "build": {
         "version": "alpha"
      },
      "os": {
         "arch": "x86",
         "name": "Windows NT",
         "version": "5.1 SP3"
        }
     }
  }

  webdriver 再次以POST方式發(fā)送請求,并啟動(dòng)瀏覽器相關(guān)信息
  [0.984][INFO]: received Webriver request: POST /session {
     "desiredCapabilities": {
      "browserName": "chrome",
      "javascriptEnabled": true,
      "platform": "ANY",
      "version": ""
     }
   }
  [0.984][INFO]: Launching chrome: "C:ocuments and SettingsAdministratorLocal S
  ettingsApplication ataGoogleChromeApplicationchrome.exe" --remote-debugging
  -port=4223 --no-first-run --enable-logging --logging-level=1 --user-data-dir="C:
  OCUME~1AMINI~1LOCALS~1Tempscoped_dir1808_7550" --load-extension="C:OCUME~1
  AMINI~1LOCALS~1Tempscoped_dir1808_26821internal" --ignore-certificate-error
  s data:text/html;charset=utf-8,
  [1.773][INFO]: sending Webriver response: 303

  webdriver再次以GET方法請求,這附加上了session的信息
  [1.778][INFO]: received Webriver request: GET /session/32b33aa585ccbbf7ba7853588
  2852af3

  服務(wù)器先對sesssionID進(jìn)行解析,確認(rèn)是selenium調(diào)用的以及要訪問的網(wǎng)址,
  [1.779][INFO]: sending Webriver response: 200 {
   "sessionId": "32b33aa585ccbbf7ba78535882852af3",
   "status": 0,
   "value": {
      "acceptSslCerts": true,
      "applicationCacheEnabled": false,
      "browserConnectionEnabled": false,
      "browserName": "chrome",
      "chrome": {
         "chromedriverVersion": "2.0"
      },
      "cssSelectorsEnabled": true,
      "databaseEnabled": true,
      "handlesAlerts": true,
      "javascriptEnabled": true,
      "locationContextEnabled": true,
      "nativeEvents": true,
      "platform": "Windows NT",
      "rotatable": false,
      "takesScreenshot": true,
      "version": "27.0.1453.116",
      "webStorageEnabled": true
     }
  }
  10:20:40.640 INFO - Done: /session
  10:20:40.640 INFO - Executing: org.openqa.selenium.remote.server.handler.GetSess
  ionCapabilities@14cf7a1 at URL: /session/ac5b2c71-5b1a-469e-814c-fdd09a2061fc)
  10:20:40.640 INFO - Done: /session/ac5b2c71-5b1a-469e-814c-fdd09a2061fc
  10:20:40.656 INFO - Executing: [get: http://www.youdao.com] at URL: /session/ac5
  b2c71-5b1a-469e-814c-fdd09a2061fc/url)

  webdriver正試向服務(wù)器請求youdao網(wǎng)站
  [1.820][INFO]: received Webriver request: POST /session/32b33aa585ccbbf7ba785358
  82852af3/url {
   "url": "http://www.youdao.com"
  }
  [1.822][INFO]: waiting for pending navigations...
  [1.829][INFO]: done waiting for pending navigations
  [2.073][INFO]: waiting for pending navigations...
  [2.900][INFO]: done waiting for pending navigations

上一頁1234下一頁
軟件測試工具 | 聯(lián)系我們 | 投訴建議 | 誠聘英才 | 申請使用列表 | 網(wǎng)站地圖
滬ICP備07036474 2003-2017 版權(quán)所有 上海澤眾軟件科技有限公司 Shanghai ZeZhong Software Co.,Ltd