#5 - How to extract Network Responses and status codes with Selenium Listeners Implementation

preview_player
Показать описание
In this video, I have explained how to extract Network responses,headers and status codes with Selenium for better Integration testing.

Please check out Selenium 4 Latest Features Playlist to watch all the concepts in sequence

Get Lifetime access to all 30+ Automation courses with one single Subscription from below link.
*****************************************************************************
Thanks
Rahul Shetty - QA Trainer/entrepreneur
Telegram Group for Interview Prep
Рекомендации по теме
Комментарии
Автор

Very useful. Thanks for sharing. Will it work for Post call as well? need to get response after clicking final button in the UI

mohamedilyas
Автор

Great content....but where we need to add this in a bdd framework?

santoshchoudhury
Автор

Hi .can you please let me know What is the java version you have used for this .

eaglesight
Автор

Great, can you access the actual response date like error message returned from the back-end

mohammadmhaidat
Автор

Hi sir,
How can i get preview of that request

harshakumarnomula
Автор

Is there any video of python selenium for same issue.?

atulmojar
Автор

Hi,
I am trying to add "DevTools devtools = driver.getDevTools(). But it is giving me an error. I tried to import different devtools library version but not working

WaqasAhmad-tqpz
Автор

Hi Sir, How to capture the traffic on a button click? In your video, does it captured the traffic when virtual Library button is clicked

raghumeda
Автор

Hello, I want to get the size out, how do I do that?

nguyenhonggiang
Автор

Can you do the same using poweshell and selenium webdriver DLL?

TarekFaham
Автор

is there a way to assert on these responses? I can assert them inside the "addListener" method, but the test does't really quit/stop on failure.

gheeno.
Автор

your tititle says extract network response. But I don't see how you extract the reponse body? I want to extract the response body from the network tab under "response" section. How do I do that?

HenryLeu
Автор

my webdriver does not have GetDevTools() method???

HenryLeu
Автор

You are using a no-op implementation of the CDP. The most likely reason for this is that Selenium was unable to find an implementation of the CDP protocol that matches your browser. Please be sure to include an implementation on the classpath, possibly by adding a new (maven) dependency of where `NN` matches the major version of the browser you're using. "I am facing this error"

shalinikushwah
Автор

Getting below error while passing Optional.empty() in Network.send
"The method enable(Optional<Integer>, Optional<Integer>, Optional<Integer>) in the type Network is not applicable for the arguments (Optional<Object>, Optional<Object>, Optional<Object>)"


Selenium code as below:
import java.util.Optional;

import org.openqa.selenium.By;
import
import
import
import

import


public class gdeLoginFlow {

public static void main(String[] args) {


WebDriver driver = new ChromeDriver();

DevTools devTools = ((ChromeDriver) driver).getDevTools();

devTools.createSession();
devTools.send(Network.enable(Optional.empty(), Optional.empty(), Optional.empty()));

}

}

pulkitagrawal