Re: [selenium-users] How to set useragent in InternetExplorerDriver() ?

722 views
Skip to first unread message

Er. Debasish Dutta

unread,
May 8, 2013, 1:47:24 AM5/8/13
to seleniu...@googlegroups.com
Hi Ruchika,

Can you please explain what exactly you want to ?? and about useragent.


Thanks
Debasish

On Wed, May 8, 2013 at 10:34 AM, Ruchika Rawat <ruchi2...@gmail.com> wrote:
Hi,
Does anyone know how I can set "useragent" value to InternetExplorerDriver?

Thanks

--
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/msg/selenium-users/-/h4eUJ9ayUjgJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Thanks & Regards,

Debasish Dutta

Er. Debasish Dutta

unread,
May 8, 2013, 3:34:12 AM5/8/13
to seleniu...@googlegroups.com
Hi Ruchika,

I think no need to extend you can put if condition. like below

if(browser.equals(firefox))
{
  driver=new FirefoxDriver();
}else if(browser.equals(IE))
{
  driver=new InternetExplorerDriver();
}


Thanks
Debasish

On Wed, May 8, 2013 at 11:26 AM, Ruchika Rawat <ruchi2...@gmail.com> wrote:
Am using Selenium -Webdriver and my tests run on FirefoxDriver(), I want to extend my tests to run on InternetExplorerDriver but with a user-agent, because my tests are for mobile site.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/epEZEXPtJbAJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jim Evans

unread,
May 8, 2013, 9:51:03 AM5/8/13
to seleniu...@googlegroups.com
The IE driver does not support changing the user agent, using capabilities or otherwise. Full stop.

Krishnan Mahadevan

unread,
May 13, 2013, 11:49:33 PM5/13/13
to seleniu...@googlegroups.com
Ruchika,
Why is it a mandate that you have to test your site on IE with a changed user agent ? Why wouldn't doing it on FF suffice ?

If you are still bent upon using IE for this then you can make use of Browser Mob Proxy for this. 

1. You would essentially spawn a BMP server
2.  Do a REST call to add a User Agent Header to BMP. 
3. Set the BMP host:port as the proxy in your Capabilities 





On Wednesday, May 8, 2013, Ruchika Rawat wrote:
Thanks Jim for the confirmation!


On Wednesday, 8 May 2013 10:34:35 UTC+5:30, Ruchika Rawat wrote:
Hi,
Does anyone know how I can set "useragent" value to InternetExplorerDriver?

Thanks

--
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/msg/selenium-users/-/ONKpd2OsGgYJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
Reply all
Reply to author
Forward
0 new messages