How setup in Internet Explorer useragent in Selenium

445 views
Skip to first unread message

Maxsa Sidorov

unread,
Oct 22, 2014, 12:09:01 AM10/22/14
to seleniu...@googlegroups.com
I write test on Selenium using c#, I need test in Internet Explorer browser.
Is it possible setup useragent in web driver?

Krishnan Mahadevan

unread,
Oct 22, 2014, 11:08:03 AM10/22/14
to Selenium Users

To the best of my knowledge you cannot set user agent via code for Internet Explorer. You might have to use a proxy server such as fiddler or browser mob proxy to do this.

On Oct 22, 2014 9:39 AM, "Maxsa Sidorov" <odes...@gmail.com> wrote:
I write test on Selenium using c#, I need test in Internet Explorer browser.
Is it possible setup useragent in web driver?

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/862d8b4e-4cae-48c6-9532-deea8bbd4ac3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anastasiia Kuzina

unread,
Oct 24, 2014, 6:19:06 AM10/24/14
to seleniu...@googlegroups.com
Hi Maxsa,
@Krishnan is right, using proxy is the best way to solve your task, as it will be a part of your tests-setup/framework setup and will not depend on extartnal tool.

It can be done by using a proxy, for example browsermob with Selenium WebDriver.
Here is an example with useragent on Java link (search for User-Agent)

There is a C# API wrapper for this proxy, but you may look for other.
Reply all
Reply to author
Forward
0 new messages