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

  再次發(fā)送定位輸入框的請求
  10:20:41.843 INFO - Executing: [find element: By.name: q] at URL: /session/ac5b2
  c71-5b1a-469e-814c-fdd09a2061fc/element)
  [3.006][INFO]: received Webriver request: POST /session/32b33aa585ccbbf7ba785358
  82852af3/element {
   "using": "name",
   "value": "q"
  }
  [3.006][INFO]: waiting for pending navigations...
  [3.006][INFO]: done waiting for pending navigations
  [3.016][INFO]: waiting for pending navigations...
  [3.016][INFO]: done waiting for pending navigations
  [3.016][INFO]: sending Webriver response: 200 {
   "sessionId": "32b33aa585ccbbf7ba78535882852af3",
   "status": 0,
   "value": {
      "ELEMENT": "0.19427558477036655:1"
     }
  }
  10:20:41.859 INFO - Done: /session/ac5b2c71-5b1a-469e-814c-fdd09a2061fc/element
  10:20:41.859 INFO - Executing: [send keys: 0 org.openqa.selenium.support.events.
  EventFiringWebDriver$EventFiringWebElement@a8215ba9, [k, e, y, ., E, N, T, E, R]
  ] at URL: /session/ac5b2c71-5b1a-469e-814c-fdd09a2061fc/element/0/value)

  對定位的到的輸入框發(fā)送回車(ENTER)事件請求
  [3.021][INFO]: received Webriver request: POST /session/32b33aa585ccbbf7ba785358
  82852af3/element/0.19427558477036655:1/value {
   "id": "0.19427558477036655:1",
   "value": [ "k", "e", "y", ".", "E", "N", "T", "E", "R" ]
  }
  [3.021][INFO]: waiting for pending navigations...
  [3.021][INFO]: done waiting for pending navigations
  [3.064][INFO]: waiting for pending navigations...
  [3.064][INFO]: done waiting for pending navigations
  [3.064][INFO]: sending Webriver response: 200 {
   "sessionId": "32b33aa585ccbbf7ba78535882852af3",
   "status": 0,
   "value": null
  }
  10:20:41.906 INFO - Done: /session/ac5b2c71-5b1a-469e-814c-fdd09a2061fc/element/
  0/value
  10:20:41.906 INFO - Executing: [close window] at URL: /session/ac5b2c71-5b1a-469
  e-814c-fdd09a2061fc/window)
  [3.068][INFO]: received Webriver request: ELETE /session/32b33aa585ccbbf7ba78535
  882852af3/window
  [WARNING:chrome_desktop_impl.cc(88)] chrome detaches, user should take care of d
  irectory:C:DOCUME~1ADMINI~1LOCALS~1Tempscoped_dir1808_7550 and C:DOCUME~1
  ADMINI~1LOCALS~1Tempscoped_dir1808_26821
  [5.318][INFO]: sending Webriver response: 200 {
   "sessionId": "32b33aa585ccbbf7ba78535882852af3",
   "status": 0,
   "value": null
  }
  10:20:44.156 INFO - Done: /session/ac5b2c71-5b1a-469e-814c-fdd09a2061fc/window

  request 請求 / response 應答

  一次請求會對應一次應答

  POST/GET  是請求(request)兩種類型;關于兩種請求方式的類別參考其它資料

  200 、203 是 HTTP請求返回的狀態(tài)碼,200表示成功;

  sessionid :每一個訪問服務器的客戶端,都要先得到服務器端分配的一個sessionid ,像通行證一樣,只有得到sessionid的客戶端才能向服務器請求想要的數(shù)據(jù)。

  其它還包括操作系統(tǒng)版本,瀏覽器類型、URL、字符類型等非常詳細的記錄。熟悉HTTP ,了解TCP 的三次握手四次揮手,相信你對瀏覽器的交互與webdriver原理會有更深入的認識。

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