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

117
Views
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
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!