Hi all,
I'm using Selenium2/Webdriver to test my application but I'm facing some problems with the scLocator.
My Selenium don't recognize elements identified by the scLocator.
Is there any solution to this problem?
below is un example of my Java code:
Regards,
SmartGWT 2.4
Firefox 3.6.14
Selenium 2.0b2
TestNG 5.14.1
I'm using Selenium2/Webdriver to test my application but I'm facing some problems with the scLocator.
My Selenium don't recognize elements identified by the scLocator.
Is there any solution to this problem?
below is un example of my Java code:
Code:
import com.thoughtworks.selenium.Selenium; import org.openqa.selenium.*; import org.openqa.selenium.htmlunit.*; import org.openqa.selenium.firefox.*; import org.openqa.selenium.chrome.*; import org.openqa.selenium.ie.*; import org.testng.annotations.*; import static org.testng.Assert.*; public class T2 { WebDriver driver; Selenium selenium; @BeforeMethod public void startSelenium() { driver = new FirefoxDriver(); selenium = new WebDriverBackedSelenium(driver, "the url"); } @AfterMethod public void stopSelenium() { driver.close(); } @Test public void testT2() { selenium.open("the url"); selenium.type("scLocator=//Window[ID=\"isc_SignInViewImpl_0\"]/ item[0] [Class=\"DynamicForm\"]/item[name=email||title=Email||index=1|| Class=TextItem]/element", "login"); selenium.type("scLocator=//Window[ID=\"isc_SignInViewImpl_0\"]/ item[0][Class=\"DynamicForm\"]/item[name=password||value=none|| index=2||Class=PasswordItem]/element", "password"); selenium.click("scLocator=//IButton[ID=\"isc_IButton_0\"]/ icon"); selenium.click("scLocator=//ListGrid[ID= \"isc_NavigationPaneSection_1_1\"]/body/row[id=14||0]/ col[fieldName=name||1]"); selenium.click("scLocator=//IButton[ID=\"isc_IButton_2\"]/"); selenium.waitForPageToLoad("30000"); } }
SmartGWT 2.4
Firefox 3.6.14
Selenium 2.0b2
TestNG 5.14.1
Comment