Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9193449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:09:59+00:00 2026-06-17T21:09:59+00:00

I need to open multiple tabs within a single browser and i need switch

  • 0

I need to open multiple tabs within a single browser and i need switch over all the tabs.

Give me your suggestions. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:10:00+00:00Added an answer on June 17, 2026 at 9:10 pm

    I’m not so strong in capybara. so, i’m giving solution to switch over between tabs using selenium.

    For a instance you clicks a button in a web page and it will open a new page.

    The new page may open in a new tab in the same browser window or in a new browser window. That is not controlled by selenium. It will control by the browser which you using.

    For a instance take firefox, goto tools->ptions-> tabs-> open new windows in a new tab instead check the option. For example, if you clicks a button it will opens a page only in the new tab of a same browser window. For a sake if you unchecked mean it will open a page in the new browser window. Likewise every browser has its own settings.

    Try this code:

     new Actions(driver)
    .sendKeys(driver.findElement(By.tagName("html")), Keys.CONTROL)
    .sendKeys(driver.findElement(By.tagName("html")), Keys.NUMPAD2)
    .build().perform();
    

    In above Keys.NUMPAD2 refers that you are gonna move to the second tab in the session.
    You can move to Third, Fourth, etc… by giving NUMPAD3, NUMPAD4, etc… respectively. Here i am using windows OS, if you are in some other OS use their shortcuts.

    I hope this will help you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to open multiple files (2 input and 2 output files), do complex
I need to open a link from within jQuery but i need to avoid
I need to open multiple Safari (or open the tab is OK) based on
I need a way to prevent multiple submits: $(#myDiv).click(function(e) { e.preventDefault(); console.log('open'); // submit
I have to work with multiple pages (tabs) at once and need to see
I need to read multiple small files and append them into a bigger single
In my web application, some users open app in multiple browser page. How can
I want to create multiple FileStreams and need to keep them open - there
I need to keep a persistent connection open across multiple page requests. You cannot
I noticed that I can open multiple tabs from different buttons/links. :) What i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.