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

293
Views
Validate dynamic (Span tag) Text using selenium Java

I need help with writing a logic to validate a dynamic text, below tag is having text which would be changing constantly( to 6 unique words), i need to validate if those 6 unique words are same as expected text. is there a way to validate that.

Note - words are created in incremental way eg - a, ap, app, appl, apple

Dynamic text Html

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

public static List<String> getDynamicText(WebDriver driver, By by, int intervalInMiliseconds, int iteration) throws InterruptedException {
    List<String> collectedTexts = new ArrayList<String>();
    for (int i = 1; i <= iteration; i++) {
        collectedTexts.add(driver.findElement(by).getText());
        Thread.sleep(intervalInMiliseconds);
    }
    return collectedTexts;
}

combine with Compare two ArrayList of String for values inside it in Java Selenium

about 4 years ago · Juan Pablo Isaza 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!