In IE new window is opening instead of new tab in selenium web driver whereas same is working chrome

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

In IE new window is opening instead of new tab in selenium web driver whereas same is working chrome

rajesh mehta
HI Group Members,

When a link is clicked manually in my application, it opens in new tab in Chrome and IE.However when my script is run, the link opens in a new window in IE instead of new tab. Same script runs as expected in Chrome. Any idea how to get rid of this?

I have used following  DesiredCapabilities   in code. Please revert asap.. 

else if (browser.equalsIgnoreCase("explorer"))
 {
 //String path = ExecutableJar.CDE; //DND For Package file
 //System.setProperty("webdriver.chrome.driver",path); //DND For Package file 
 System.setProperty("webdriver.ie.driver","C:\\\\temp\\AutomationTests_SampleCube\\src\\External_Jars\\libs\\IEDriverServer.exe");
   DesiredCapabilities  dc = DesiredCapabilities.internetExplorer();
   dc.setJavascriptEnabled(true);
   dc.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
   dc.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION, true);
   dc.setCapability(InternetExplorerDriver.ENABLE_ELEMENT_CACHE_CLEANUP, true);

   dc.setCapability(InternetExplorerDriver.NATIVE_EVENTS, true);
       
       return new InternetExplorerDriver(dc);
 }

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/ce3b87f0-75bc-49ce-abba-71ee7856e99a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: In IE new window is opening instead of new tab in selenium web driver whereas same is working chrome

⇜Krishnan Mahadevan⇝

Rajesh,

 

How does it matter if the link opens up in a new tab or a new window ? AFAIK these two are just two different presentations that the browser offers for ease of use for the users.

I don’t think it really matters if it’s a tab or a new window. To the browser and for that matter, to selenium, it’s the same thing.

 

I believe there’s a setting in IE wherein you can have IE always resort to opening new windows as tabs. Maybe its that setting that’s interfering here.

 

All said and done, your selenium script should be agnostic to this because in both the cases, the behavior would be the same w.r.t Selenium.

 

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/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of rajesh mehta <[hidden email]>
Reply-To: <[hidden email]>
Date: Monday, May 15, 2017 at 2:55 PM
To: Selenium Users <[hidden email]>
Subject: [selenium-users] In IE new window is opening instead of new tab in selenium web driver whereas same is working chrome

 

HI Group Members,

 

When a link is clicked manually in my application, it opens in new tab in Chrome and IE.However when my script is run, the link opens in a new window in IE instead of new tab. Same script runs as expected in Chrome. Any idea how to get rid of this?

 

I have used following  DesiredCapabilities   in code. Please revert asap.. 

 

else if (browser.equalsIgnoreCase("explorer"))

             {

                         //String path = ExecutableJar.CDE; //DND For Package file

                         //System.setProperty("webdriver.chrome.driver",path); //DND For Package file 

                         System.setProperty("webdriver.ie.driver","C:\\\\temp\\AutomationTests_SampleCube\\src\\External_Jars\\libs\\IEDriverServer.exe");

                           DesiredCapabilities  dc = DesiredCapabilities.internetExplorer();

                           dc.setJavascriptEnabled(true);

                           dc.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);

                           dc.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION, true);

                           dc.setCapability(InternetExplorerDriver.ENABLE_ELEMENT_CACHE_CLEANUP, true);

 

                           dc.setCapability(InternetExplorerDriver.NATIVE_EVENTS, true);

               

               return new InternetExplorerDriver(dc);

             }

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/ce3b87f0-75bc-49ce-abba-71ee7856e99a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4139B1D3-5A46-47F5-8D59-2235E96C5CEB%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: In IE new window is opening instead of new tab in selenium web driver whereas same is working chrome

rajesh mehta
HI Krishnan,

Well, thanks for ur time and patience for this revet. I second on this whatever you have explained but problem which i am facing is little different here. Had to move my control of driver from one tab to another tab upon clicking on some link which result to open a new tab. Now same is working fine chrome and firefox..but in IE it is opening a tab every time manually. However same is not happening whenever IE run by driver. 

Please suggest further what to do. Have tried to add some capabilities and option but no luck so far. 

Thanks 
Rajesh Mehta

On Wednesday, 17 May 2017 11:51:30 UTC+5:30, Krishnan wrote:

Rajesh,

 

How does it matter if the link opens up in a new tab or a new window ? AFAIK these two are just two different presentations that the browser offers for ease of use for the users.

I don’t think it really matters if it’s a tab or a new window. To the browser and for that matter, to selenium, it’s the same thing.

 

I believe there’s a setting in IE wherein you can have IE always resort to opening new windows as tabs. Maybe its that setting that’s interfering here.

 

All said and done, your selenium script should be agnostic to this because in both the cases, the behavior would be the same w.r.t Selenium.

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Xk9lMKScAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com> on behalf of rajesh mehta <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Xk9lMKScAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rajesh...@...>
Reply-To: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Xk9lMKScAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com>
Date: Monday, May 15, 2017 at 2:55 PM
To: Selenium Users <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Xk9lMKScAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com>
Subject: [selenium-users] In IE new window is opening instead of new tab in selenium web driver whereas same is working chrome

 

HI Group Members,

 

When a link is clicked manually in my application, it opens in new tab in Chrome and IE.However when my script is run, the link opens in a new window in IE instead of new tab. Same script runs as expected in Chrome. Any idea how to get rid of this?

 

I have used following  DesiredCapabilities   in code. Please revert asap.. 

 

else if (browser.equalsIgnoreCase("explorer"))

             {

                         //String path = ExecutableJar.CDE; //DND For Package file

                         //System.setProperty("webdriver.chrome.driver",path); //DND For Package file 

                         System.setProperty("webdriver.ie.driver","C:\\\\temp\\AutomationTests_SampleCube\\src\\External_Jars\\libs\\IEDriverServer.exe");

                           DesiredCapabilities  dc = DesiredCapabilities.internetExplorer();

                           dc.setJavascriptEnabled(true);

                           dc.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);

                           dc.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION, true);

                           dc.setCapability(InternetExplorerDriver.ENABLE_ELEMENT_CACHE_CLEANUP, true);

 

                           dc.setCapability(InternetExplorerDriver.NATIVE_EVENTS, true);

               

               return new InternetExplorerDriver(dc);

             }

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Xk9lMKScAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">selenium-user...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Xk9lMKScAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/ce3b87f0-75bc-49ce-abba-71ee7856e99a%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/ce3b87f0-75bc-49ce-abba-71ee7856e99a%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/ce3b87f0-75bc-49ce-abba-71ee7856e99a%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/ce3b87f0-75bc-49ce-abba-71ee7856e99a%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/905c0494-d110-4441-8c8d-8b5567145999%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: In IE new window is opening instead of new tab in selenium web driver whereas same is working chrome

⇜Krishnan Mahadevan⇝

Am not sure I quite understand the problem. Are you saying that you aren't able to switch to the new tab using switchTo().window() ?


On Wed, May 17, 2017, 18:39 Seleniumnovic <[hidden email]> wrote:
HI Krishnan,

Well, thanks for ur time and patience for this revet. I second on this whatever you have explained but problem which i am facing is little different here. Had to move my control of driver from one tab to another tab upon clicking on some link which result to open a new tab. Now same is working fine chrome and firefox..but in IE it is opening a tab every time manually. However same is not happening whenever IE run by driver. 

Please suggest further what to do. Have tried to add some capabilities and option but no luck so far. 

Thanks 
Rajesh Mehta


On Wednesday, 17 May 2017 11:51:30 UTC+5:30, Krishnan wrote:

Rajesh,

 

How does it matter if the link opens up in a new tab or a new window ? AFAIK these two are just two different presentations that the browser offers for ease of use for the users.

I don’t think it really matters if it’s a tab or a new window. To the browser and for that matter, to selenium, it’s the same thing.

 

I believe there’s a setting in IE wherein you can have IE always resort to opening new windows as tabs. Maybe its that setting that’s interfering here.

 

All said and done, your selenium script should be agnostic to this because in both the cases, the behavior would be the same w.r.t Selenium.

 

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/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of rajesh mehta <[hidden email]>
Reply-To: <[hidden email]>


Date: Monday, May 15, 2017 at 2:55 PM

To: Selenium Users <[hidden email]>


Subject: [selenium-users] In IE new window is opening instead of new tab in selenium web driver whereas same is working chrome

 

HI Group Members,

 

When a link is clicked manually in my application, it opens in new tab in Chrome and IE.However when my script is run, the link opens in a new window in IE instead of new tab. Same script runs as expected in Chrome. Any idea how to get rid of this?

 

I have used following  DesiredCapabilities   in code. Please revert asap.. 

 

else if (browser.equalsIgnoreCase("explorer"))

             {

                         //String path = ExecutableJar.CDE; //DND For Package file

                         //System.setProperty("webdriver.chrome.driver",path); //DND For Package file 

                         System.setProperty("webdriver.ie.driver","C:\\\\temp\\AutomationTests_SampleCube\\src\\External_Jars\\libs\\IEDriverServer.exe");

                           DesiredCapabilities  dc = DesiredCapabilities.internetExplorer();

                           dc.setJavascriptEnabled(true);

                           dc.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);

                           dc.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION, true);

                           dc.setCapability(InternetExplorerDriver.ENABLE_ELEMENT_CACHE_CLEANUP, true);

 

                           dc.setCapability(InternetExplorerDriver.NATIVE_EVENTS, true);

               

               return new InternetExplorerDriver(dc);

             }

--
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 [hidden email].
To post to this group, send email to [hidden email].

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/905c0494-d110-4441-8c8d-8b5567145999%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

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/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLmToJT1xaLpkwMagPLcRt19EA_LuO57%3DbH93G5yqrHEMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: In IE new window is opening instead of new tab in selenium web driver whereas same is working chrome

Akshat Gupta
In reply to this post by rajesh mehta
Hi,

Try to use robot class. There you can press Ctrl + T for opening new Tab.
This is a option which will work. Better options still available.

Thanks.
Akshat

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4a0df25e-9267-4b20-ac79-5b613637336f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.