简体   繁体   English

通过Java中的表单提交数据时捕获Web服务响应

[英]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. 我正在自动化表格[使用Selenium WebDriver,Java],在其中填写表格并提交后,数据将发送到webservice。 Intern Webservice returns a campaign id but its not shown in form. 实习生Web服务返回广告系列ID,但未在表单中显示。 For that i have press F12 and go network tab .. and so to see in chrome. 为此,我按了F12并转到“网络”标签..以便在chrome中查看。

I have succesfully automated data entering in form and submission. 我成功地以表格和提交方式自动输入了数据。 Where am struck is to capture response sent by webservice. 令人震惊的是捕获Web服务发送的响应。 Is it possible to capture Webservice resonse in java when data was submitted through form. 通过表单提交数据时,是否可以捕获Java中的Web服务响应。

Thanks in advance. 提前致谢。
Narendra 纳伦德拉

This may not be possible directly using Selenium. 直接使用Selenium可能无法实现。 Please check if you can use browsermob-proxy which acts as a proxy between your WebDriver and the web application. 请检查是否可以使用browsermob-proxy充当WebDriver和Web应用程序之间的代理。 Pleaser refer this sample code for integrating it with Selenium. 请参考此示例代码以将其与Selenium集成。 It can be used to capture all network traffic in HAR format. 它可以用于捕获HAR格式的所有网络流量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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