简体   繁体   中英

Capture Webservice response when data submitted through form in java


I am automating a form [Using Selenium WebDriver, Java ] where after filling the forms and submit, the data sends to webservice. Intern Webservice returns a campaign id but its not shown in form. For that i have press F12 and go network tab .. and so to see in chrome.

I have succesfully automated data entering in form and submission. Where am struck is to capture response sent by webservice. Is it possible to capture Webservice resonse in java when data was submitted through form.

Thanks in advance.
Narendra

This may not be possible directly using Selenium. Please check if you can use browsermob-proxy which acts as a proxy between your WebDriver and the web application. Pleaser refer this sample code for integrating it with Selenium. It can be used to capture all network traffic in HAR format.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM