Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Selenium:如何修改或注入HTTP Post数据请求头?_Http_Selenium_Postdata - Fatal编程技术网

使用Selenium:如何修改或注入HTTP Post数据请求头?

使用Selenium:如何修改或注入HTTP Post数据请求头?,http,selenium,postdata,Http,Selenium,Postdata,请注意,这个问题与硒有关 在HTML表单提交之前,即selenium。单击(“//按钮[@type='submit']”) 我想在HTTP Post中向服务器注入一个本机级别的名称-值对 将HTTP Post更改为: POSTDATA=register=true&accountType=customer 致: 使用Selenium命令并不清楚如何拦截和修改回服务器的内容 关于如何在硒或硒元素中实现预期效果,有什么想法吗?感谢NJ理论上,您可以使用javascript或jQuery更改页

请注意,这个问题与硒有关

在HTML表单提交之前,即
selenium。单击(“//按钮[@type='submit']”)

我想在HTTP Post中向服务器注入一个本机级别的名称-值对

将HTTP Post更改为:

POSTDATA=register=true&accountType=customer
致:

使用Selenium命令并不清楚如何拦截和修改回服务器的内容


关于如何在硒或硒元素中实现预期效果,有什么想法吗?感谢NJ

理论上,您可以使用javascript或jQuery更改页面。例如,使用jQuery,您可以添加一个带有默认值或预设值的隐藏表单元素,该值将在表单提交时传递。(如果我正确理解您的问题-模拟篡改数据?)

POSTDATA=register=true&accountType=customer&mynewfield=true