Hi! I’ve been trying to run this test but keep failing. If someone could pls help, I would really really appreciate it!
I’m trying to get our site’s game load time but the WebDriver can never find the element #GamePanel > div > div.bottomBarBalance > div.gwt-HTML.bottomBarBalanceTitle. This is the black bar in the bottom of the screen. It also can’t find id=GameCanvas when I tried that. I’m out of ideas!
Here’s the code I used:
var pkg = JavaImporter(org.openqa.selenium); //WebDriver classes
var support_ui = JavaImporter(org.openqa.selenium.support.ui.WebDriverWait); //WebDriver classes
var conditions = org.openqa.selenium.support.ui.ExpectedConditions
var wait = new support_ui.WebDriverWait(WDS.browser, 40);
WDS.sampleResult.sampleStart(); //captures sampler’s start time
WDS.sampleResult.getLatency();
WDS.log.info(“Sample started”);
WDS.browser.get(‘Michigan Lottery’); //opens game info page
WDS.log.info(“Sample ended - navigated to game info page”);
wait.until(conditions.presenceOfElementLocated(pkg.By.cssSelector(‘#GamePanel > div:nth-child(2) > div:nth-child(2) > button’)));
WDS.sampleResult.sampleEnd();