LOGGER.info("برسی امتیاز"); String test1=driver.findElement(By.id("ir.mci.ecareapp:id/loyalty_score_game_tv_club_games_activity")).getText(); String numbers = test1.replaceAll("[^0-9]", ""); //int sum = Integer.parseInt(numbers) - 100; int ScoreGame = Integer.parseInt(test1); System.out.println(ScoreGame); LOGGER.info("امتیاز کاربر"+ScoreGame); if (ScoreGame <= 0) { LOGGER.error("Test failed "); Assert.fail("Test failed "); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter