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

  再次發(fā)送定位輸入框的請(qǐng)求
  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)

  對(duì)定位的到的輸入框發(fā)送回車(chē)(ENTER)事件請(qǐng)求
  [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 請(qǐng)求 / response 應(yīng)答

  一次請(qǐng)求會(huì)對(duì)應(yīng)一次應(yīng)答

  POST/GET  是請(qǐng)求(request)兩種類(lèi)型;關(guān)于兩種請(qǐng)求方式的類(lèi)別參考其它資料

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

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

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

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