Hi,
I am evaluating selenium for automating our SmartGWT GUI. Currently I try to assert the message text which gets displayed with SC.warn("some text"). Unfortunately i am not able to locate the element from selenium. I copied the scLocator for the message from Selenium IDE, but when I call findElement with the locator the element is not found(message from debugger "org.openqa.selenium.remote.RemoteWebElement@6e13ad91 -> unknown locator" )
This is the code i am using. We use SmartGWT 6.0p from 28.02.2017 and selenium-java 2.53.1
File ff45esr = new File("C:\\Program Files\\Mozilla Firefox ESR 45\\firefox.exe");
SmartClientWebDriver driver = new SmartClientFirefoxDriver(new FirefoxBinary(ff45esr));
driver.get(BASE_URL);
driver.waitForElementPresent(ByScLocator.scLocator("scLocator=//Dialog[ID="isc_globalWarn"]/messageLabel/"));
WebElement ele = driver.findElement(ByScLocator.scLocator("scLocator=//Dialog[ID="isc_globalWarn"]/messageLabel/"));
How can I assert the displayed message with selenium?
Thanks
Regards,
Martin
I am evaluating selenium for automating our SmartGWT GUI. Currently I try to assert the message text which gets displayed with SC.warn("some text"). Unfortunately i am not able to locate the element from selenium. I copied the scLocator for the message from Selenium IDE, but when I call findElement with the locator the element is not found(message from debugger "org.openqa.selenium.remote.RemoteWebElement@6e13ad91 -> unknown locator" )
This is the code i am using. We use SmartGWT 6.0p from 28.02.2017 and selenium-java 2.53.1
File ff45esr = new File("C:\\Program Files\\Mozilla Firefox ESR 45\\firefox.exe");
SmartClientWebDriver driver = new SmartClientFirefoxDriver(new FirefoxBinary(ff45esr));
driver.get(BASE_URL);
driver.waitForElementPresent(ByScLocator.scLocator("scLocator=//Dialog[ID="isc_globalWarn"]/messageLabel/"));
WebElement ele = driver.findElement(ByScLocator.scLocator("scLocator=//Dialog[ID="isc_globalWarn"]/messageLabel/"));
How can I assert the displayed message with selenium?
Thanks
Regards,
Martin
Comment