[英]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 . 如果要获取Header
和Response
信息,可以使用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.