Hi
I am a Software Tester and test an application which is developed with smart Google GWT.
I recorded the scLocator with Selenium IDE.
And develop the testautomatisation with java. Execute the test auto with Internet Explorer 11.0.9.
The Software Developers use:
1) SmartClient_v91p_2014-06-26_Pro
2) The smartgwtpro-4.1p
3) GWT SDK 2.5.1
It is not possible to get the state (true or false) from the Checkbox which was recorded with a Selenium scLocator.
I try isSelected(), isChecked() and getAttribute("value"). None of those works.
But in standard selenium with xpaht the method isSelected() works fine.
But not for an element which was recorded with an scLocator.
What is the problem?
I am a Software Tester and test an application which is developed with smart Google GWT.
I recorded the scLocator with Selenium IDE.
And develop the testautomatisation with java. Execute the test auto with Internet Explorer 11.0.9.
The Software Developers use:
1) SmartClient_v91p_2014-06-26_Pro
2) The smartgwtpro-4.1p
3) GWT SDK 2.5.1
It is not possible to get the state (true or false) from the Checkbox which was recorded with a Selenium scLocator.
I try isSelected(), isChecked() and getAttribute("value"). None of those works.
But in standard selenium with xpaht the method isSelected() works fine.
But not for an element which was recorded with an scLocator.
Code:
// C H E C K B O X -> scLocator –JAVA-CODE <- // import org.openqa.selenium.By; By loc_CheckBoxSample = ByScLocator.scLocator( "//VLayout[ID=\"gridform_Example..._ID\"]/member[Class=DynamicForm||index=0||length=2||classIndex=0||classLength=1]/item[name=sample...YN||title=sample||value=true||index=1||Class=CheckboxItem]/textbox"); // import org.openqa.selenium.WebElement; WebElement cParagraph = driver.findElement(loc_CheckBoxSample); // import net.thucydides.core.webelements.Checkbox; Checkbox cbEE = new Checkbox(cParagraph); Boolean question = cParagraph.isSelected(); Boolean bQuestion = cbEE.isChecked(); System.out.println("question is " + question + " q= " + bQuestion); // -> both false cParagraph.click(); // -> Checkbox toggles to true question = cParagraph.isSelected(); bQuestion = cbEE.isChecked(); System.out.println("question is " + question + " q= " + bQuestion); // -> still both false // next try String str2 = cParagraph.getAttribute("value"); // 'str2' is in all cases null ?? Expected: true or false
Comment