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


how to switch to a new window

View previous topic View next topic Go down

how to switch to a new window

Post by shrutika on Thu Oct 02, 2014 4:11 pm

hi, I have written a script in selenium rc. I m facing one problem regarding new window selection.
my script issue is when I click on a button the page gets open in new firefox window for which I have written a verification code (i.e waitForCondition("element xpath")..) but my script fails here. iI think since it doesnt switch the window my script may be failing over please help me how to switch window .I tried using selenium.selectWindow("windowtitle/windowname"), still it fails


Posts : 4
Join date : 2014-09-26

Back to top Go down

Re: how to switch to a new window

Post by Job46 on Wed Aug 05, 2015 9:50 pm

Hello , 
this is a C# code that answer your question:

driver.Navigate().GoToUrl("Your URL");

String homePage = driver.CurrentWindowHandle;

//change the window then:

ReadOnlyCollection windows= driver.WindowHandles;
            String currentWindowId;
            foreach(String window in windows)
                currentWindowId = window.ToString();


Posts : 3
Join date : 2015-05-22

Back to top Go down

Read More

Post by Micheal William on Mon May 30, 2016 3:03 pm

Maximum students in classes or while sitting in the coffee shop or other places frequently ask their mates, “Is there anyone who will write my assignment for me?”Unfortunately, they cannot find anyone who would write their assignments. But now they don’t need to request their friends or relatives to write their assignments for them. Because will write your assignments and will help you get best academic grades. And you will proudly say that ‘Excellent Academic Help’ made my grade.

Micheal William

Posts : 1
Join date : 2016-05-30

Back to top Go down

Re: how to switch to a new window

Post by janbaskt on Mon Nov 21, 2016 6:43 pm

this is best code for New Windows

Active particpant
Active particpant

Posts : 10
Join date : 2016-11-21

Back to top Go down

Re: how to switch to a new window

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