Attached is a screenshot showcasing HTML tags: Our task is to display the 3 within react-text.
Here's the code snippet I attempted: WebElement MyText = driver.findElement(By.xpath("(//div[@class='badge-number'])[6]"));
JavascriptExecutor jse = (JavascriptExecutor)driver;
String platformName = (String) jse.executeScript("return arguments[0].value;", MyText); System.out.println("text:"+MyText.getText());
I simply aim to output the changing minutes and seconds.