Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Regarding Alert Interface
Fri Feb 24, 2017 2:00 pm by karthikeyakumar

» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

How to switch another Tab of Firefox when click a link and it will open in another tab?

View previous topic View next topic Go down

How to switch another Tab of Firefox when click a link and it will open in another tab?

Post by selenium.testing07 on Mon Dec 13, 2010 8:09 pm

Hi,
In the same case I'm getting an error "warn(1292245359123): Link has target '_blank', which is not supported in Selenium! Randomizing target to be: selenium_blank69196", when i run this code.
Some one please help me out, in this functionality. The goal is simple to move another opened tab to search some text.


This code is in C#

public void TheUntitledTest()
{
selenium.Open("/abc/static/index.html");
// selenium.WindowFocus();
selenium.Click("link=Privacy Statement");
selenium.WaitForPopUp("hello world - Mozilla Firefox", "20000");
selenium.SelectPopUp("hello world - Mozilla Firefox");
selenium.WaitForPageToLoad("30000");
for (int second = 0; ; second++)
{
if (second >= 60) Assert.Fail("timeout");
try
{
if (selenium.IsTextPresent("welcome")) break;
}
catch (Exception)
{
}
Thread.Sleep(1000);

selenium.testing07
Regular Participant
Regular Participant

Posts : 26
Join date : 2010-11-20

Back to top Go down

Re: How to switch another Tab of Firefox when click a link and it will open in another tab?

Post by Adviser on Mon Dec 13, 2010 9:58 pm

Try to make setting to open all link in new window and then switch to the window.

Tab window is not worked. In firefox tab setting setting uncheck the first option and run your code with windowfocus command to go to new window.

Try this option and sure it will help you.

Adviser
------------------------
------------------------

Posts : 379
Join date : 2009-07-30
Location : India

http://seleniumforum.forumotion.net

Back to top Go down

Re: How to switch another Tab of Firefox when click a link and it will open in another tab?

Post by selenium.testing07 on Tue Dec 14, 2010 2:30 pm

Still not success, can you explain with an example?

selenium.testing07
Regular Participant
Regular Participant

Posts : 26
Join date : 2010-11-20

Back to top Go down

Re: How to switch another Tab of Firefox when click a link and it will open in another tab?

Post by selenium.testing07 on Tue Dec 14, 2010 7:46 pm

Hi,
I search so may blogs and links,
But I did not find proper solution,
its really hack-tic. ufffffffffff Sad

Question

selenium.testing07
Regular Participant
Regular Participant

Posts : 26
Join date : 2010-11-20

Back to top Go down

Re: How to switch another Tab of Firefox when click a link and it will open in another tab?

Post by selenium.testing07 on Tue Dec 14, 2010 11:50 pm

Hi,
I'm using Selenium.getfocus function in following way:

selenium.WindowFocus("Software Testing - Mozilla Firefox", selenium.GetTitle());

Now when I Rebuild the code error comes up:

Error 1 No overload for method 'WindowFocus' takes '2' arguments



selenium.testing07
Regular Participant
Regular Participant

Posts : 26
Join date : 2010-11-20

Back to top Go down

Re: How to switch another Tab of Firefox when click a link and it will open in another tab?

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum