Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

594
Views
¿Cómo abrir una nueva pestaña usando Selenium WebDriver en C#?
  1. webElement.SendKeys(Keys.Control + "t"); Este código no funciona para mí.
  2. String n = Keys.chord(Keys.CONTROL, Keys.ENTER); driver.findElement(By.id("open-tab")).sendKeys(n); En qué key.chord no funciona para selenium C#.
  3. driver.SwitchTo().Window(driver.WindowHandles[0]); este tampoco funciona con mi código. ¿Hay alguna forma alternativa disponible para cambiar de pestaña?
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Solución de selenio 4:

 driver.SwitchTo().NewWindow(WindowType.Tab);

Tenga en cuenta que abrirá una nueva pestaña en la misma ventana y también cambiará a la pestaña recién abierta.

para abrir una nueva ventana, debe utilizar:

 driver.SwitchTo().NewWindow(WindowType.Window);

Solución de selenio 3:

 ((IJavaScriptExecutor)driver).ExecuteScript("window.open()"); List<string> tabs = new List<string> (driver.WindowHandles); driver.SwitchTo().Window(tabs[1]);
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!