UrbanPro

Learn Selenium from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

How do I open multiple windows with the same url in Selenium using Java?

Asked by Last Modified  

Follow 4
Answer

Please enter your answer

WebDriver navigate().to() and get() do exactly the same thing. There is no API to open a new window, but you can use ctrl+n hotkey: WebDriver driver = new FirefoxDriver(); WebElement body = driver.findElement(By.tagName("body")); body.sendKeys(Keys.chord(Keys.CONTROL, "n")); System.out.println(driver.getWindowHandles().size()); ...
read more
WebDriver navigate().to() and get() do exactly the same thing. There is no API to open a new window, but you can use ctrl+n hotkey: WebDriver driver = new FirefoxDriver(); WebElement body = driver.findElement(By.tagName("body")); body.sendKeys(Keys.chord(Keys.CONTROL, "n")); System.out.println(driver.getWindowHandles().size()); driver.quit(); Or you can use few instances of WebDriver (see Selenium Java open new window, close it, and control main window again) read less
Comments

Spoken English Teacher

declare multiple driver objects and then navigate to same URL.
Comments

Expert In QTP/Selenium

can u share the scenario where u want to use this.... then it will easy to understand the query.
Comments

Tutor

We can achieve this by XML concepts
Comments

View 2 more Answers

Related Questions

what is pop handling ?
using windowhandles() you can do popup handling with selenium webdriver
Vishal
To start learning Selenium, how well do I have to know or be familiar with Java?
If you have to learn Web driver then you have to learn Java. At least you should be learning Core Java. In Selenium Web driver most of the things or every thing is done in Java. Or you can choose alternative programming language.
Uday
0 0
6
What is the cost of ISTQB Test? What is the procedure to apply for it? I am a graduate in B.Sc. Can this ISTQB test help me in finding a IT job?
Hi Jagadeesh, Getting a job in Testing needs good conceptual knowledge in Software Engineering, Testing, Test Methodologies and types, Test Reporting and Metrics. ISTQB will have questions more related...
Jagadeesh
Which one is good to learn, Salesforce or Selenium? I know they are entirely different, but which one will be more in demand in the future?
Selenium is good to learn. It has good future. Learn selenium automation & expertise in using Selenium 3.0 to create robust, browser-based regression automation suites and tests, scale and distribute...
Arumugam
0 0
5

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Example of DependsOnMethod in TestNG
public class dependsonM { @Test public void login() { System.out.println("login"); } @Test (dependsOnMethods = {"login"}) public void email() { //Intentionally I am failing this testcase Assert.assertTrue(false);...
S

Sarthak C.

0 0
0

Dada Provider concepts in Selenium
https://www.youtube.com/watch?v=5olSfyB1r9A

Bhanu P.

1 0
0

Difference between find element () and findelements () in webdriver
findElement Find the first element within the current page using the given "locating mechanism". Returns a single WebElement. findElements Find all elements within the current...

doWhile example in Java
public class doWhilePracticleEx { public void test() { } public static void main(String args) { String q1 = "Who is PM of India?"; String a1 = "Sonia Gandhi"; String a2 = "Rahul Gandhi"; String a3...
S

Sarthak C.

0 0
0

ListIterator Example
public class ListIteratorEx { public static void main(String args) { List<String> li = new ArrayList<String>(); li.add("java1"); li.add("java2"); li.add("java3"); li.add("java4"); ListIterator...
S

Sarthak C.

0 0
0

Recommended Articles

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

Read full article >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Almost all of us, inside the pocket, bag or on the table have a mobile phone, out of which 90% of us have a smartphone. The technology is advancing rapidly. When it comes to mobile phones, people today want much more than just making phone calls and playing games on the go. People now want instant access to all their business...

Read full article >

Software Development has been one of the most popular career trends since years. The reason behind this is the fact that software are being used almost everywhere today.  In all of our lives, from the morning’s alarm clock to the coffee maker, car, mobile phone, computer, ATM and in almost everything we use in our daily...

Read full article >

Looking for Selenium Training?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Selenium Classes?

The best tutors for Selenium Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Selenium with the Best Tutors

The best Tutors for Selenium Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more