Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

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);
avatar
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.
avatar
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?
avatar
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
avatar
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


avatar
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