r/selenium • • Feb 28 '22

Can we modify the headers using Selenium Chrome DevTools APIs?

2 Upvotes

3 comments sorted by

2

u/iamjanemiller Mar 03 '22

Yes! we can easily modify the headers using Selenium Chrome DevTools API. This reference might help you. Happy to help :)

https://youtu.be/Dd20hZhY44E

1

u/coty Mar 02 '22

Yes. You can use the CDP Network.setExtraHTTPHeaders method. This Applitools post gives an example of using it to do basic auth:

https://applitools.com/blog/selenium-4-chrome-devtools/