简体   繁体   English

我们如何使用Selenium获取“网络”选项卡信息(标题,响应等)

[英]How can we get Network tab information (Header, Response, etc) using Selenium

I have an application to automate where I am facing issues when trying to perform some action(uploading images) using scripts. 当尝试使用脚本执行一些操作(上载图像)时,我有一个应用程序可以自动化我遇到的问题。 But when I try to do the same action manually it works. 但是,当我尝试手动执行相同的操作时,它可以工作。 So how can I know which API request is causing a problem. 所以我怎么知道哪个API请求引起了问题。

PS: I tried giving thread sleep time while running the scripts and try to open network tab, but it wasn't work :( PS:我尝试在运行脚本时给线程睡眠时间,并尝试打开“网络”选项卡,但这不起作用:(

If you want to get Header and Response information you can use BrowserMob Proxy . 如果要获取HeaderResponse信息,可以使用BrowserMob Proxy But I doubt it will give you the information to fix your upload issue. 但我怀疑它能否为您提供解决上传问题的信息。 If you are trying to upload an image through Selenium please remember you need to send the local location of the image to the "upload locator" on the page directly using sendKeys method instead of clicking on the upload button and using the system dialog box which is not possible. 如果您尝试通过Selenium上传图像,请记住,您需要直接使用sendKeys方法而不是单击上载按钮并使用系统对话框将图像的本地位置发送到页面上的“上载定位器”。不可能。

暂无
暂无

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

相关问题 我们可以使用 Selenium 或任何其他 jar 来获取网络响应并进行验证吗? - Can we use Selenium or any other jars to get network response and validate 我们如何将 header 信息传递给 JsonDataSource? - How can we pass header information to a JsonDataSource? 如何从 angular 8 应用程序的浏览器中的网络选项卡的 header 部分下获取具有 SAML 响应的表单数据详细信息? - How to get Form-Data details having SAML Response under header section of network tab from Browser in angular 8 application? 如何从Spring RestTemplate GET请求获取响应头信息 - How to get Response Header information from Spring RestTemplate GET request 使用 Selenium 如何获取网络请求 - Using Selenium how to get network request 如何通过 Selenium 发送 API 标头请求并获得响应 - How to Send API header request through Selenium and get response back 使用 Selenium Java 清除网络选项卡 - Clear Network tab using Selenium Java 我们可以使用 selenium Webdriver 访问银行网站的 Web 元素,如 ICICI、HDFC、SBI 等以实现自动化吗? - Can we access web elements of bank websites like ICICI, HDFC, SBI etc for automation using selenium Webdriver? 我们如何使用 Selenium WebDriver 获得加载页面的准确时间? - How can we get exact time to load a page using Selenium WebDriver? 我们怎样才能获得使用selenium webdriver加载所有链接的准确时间? - How can we get exact time to load all the links using selenium webdriver?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM