Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

118
Vistas
NoSuchElementException in Safaribrowser Mac

This java class has been created with testng. driver.get("https://rediff.com");

                WebElement rediffsignin = driver.findElement(By.xpath("//*[@id=\"signin_info\"]/a[1]"));
                rediffsignin.click();
                 
            
                
                Thread.sleep(3000);
                
                WebElement username = driver.findElement(By.id("login1"));
                username.sendKeys(email);
                
                WebElement epassword = driver.findElement(By.id("password"));
                epassword.sendKeys(rpassword);
                
                WebElement signin = driver.findElement(By.cssSelector("input[type='submit']"));
                signin.click();
                
                driver.manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS); 
                //String currentHandle = driver. getWindowHandle();
                
                Thread.sleep(1000);
                
                Emaillinkinvoke et = PageFactory.initElements(driver,Emaillinkinvoke.class);
                
                Thread.sleep(3000);
                
                driver.switchTo().defaultContent();

                
                et.emaillink(emailsubject);
                
                try { 
                    Thread.sleep(2000);
                }catch(Exception e) {
                    e.printStackTrace();
                }
            
Here comes the Emaillinkinvoke class:

public class Emaillinkinvoke {

private WebDriver driver;

@FindBy(how= How.XPATH, xpath = "//span[@class='rd_subject']")
List<WebElement> emailThreads;




public Emaillinkinvoke(WebDriver driver)
{
    this.driver=driver;
}

public void emaillink(String emailsubject) throws InterruptedException {

    for(int i=0; i<emailThreads.size();)
    {
        if(emailThreads.get(i).getText().contains(emailsubject)) {
            emailThreads.get(i).click();
            System.out.println("email Clicked");
            break;
        }
        break;
    }
    
    Thread.sleep(1000);
WebElement verifylink = driver.findElement(By.partialLinkText("link"));
verifylink.click();

    
}

The same code is passed in Windows os - chrome,firefox and Edge browsers. In Mac, same code is passed in MAC os - Chrome, firefox. However, in Safari, facing No such frame Exception while searching for the element 'rd_subject'in the email.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda