- theYoRecords
- Posts : 2
Join date : 2012-10-26
Locators in WebDriverBackedSelenium
Sat Dec 01, 2012 10:07 pm
Hey there,
I've got a problem by locating elements with WebDriverBackedSelenium in an open WebDriver-Session.
According to all information i found these locators are for example Css-Locators, IDs, XPath and so on. But I can't get this to work. By the way I'm using C#.
Here's an example:
This works:
driver.FindElement(By.Id("test")).Click();
But this doesn't:
wdb.Click("id='test'");
Can you tell me what's wrong?
And is it correct to initialize the WDBSelenium like that:
var wdb = new WebDriverBackedSelenium(driver, driver.URL);
wdb.Start();
Thanks!
I've got a problem by locating elements with WebDriverBackedSelenium in an open WebDriver-Session.
According to all information i found these locators are for example Css-Locators, IDs, XPath and so on. But I can't get this to work. By the way I'm using C#.
Here's an example:
This works:
driver.FindElement(By.Id("test")).Click();
But this doesn't:
wdb.Click("id='test'");
Can you tell me what's wrong?
And is it correct to initialize the WDBSelenium like that:
var wdb = new WebDriverBackedSelenium(driver, driver.URL);
wdb.Start();
Thanks!
Re: Locators in WebDriverBackedSelenium
Tue Dec 04, 2012 2:15 pm
Are you migrating from Sel1 to Sel2 ?
Also can you try - wdb.Click("'test'");
Also can you try - wdb.Click("'test'");
- theYoRecords
- Posts : 2
Join date : 2012-10-26
Re: Locators in WebDriverBackedSelenium
Sat Dec 08, 2012 9:35 pm
tarun3kumar wrote:Are you migrating from Sel1 to Sel2 ?
Also can you try - wdb.Click("'test'");
Thanks for your reply!
I´m migrating from WatiN to Sel2.
The problem has been solved. In the example above I should have used
wdb.Click("id=test");
and anyway I didn´t recognize that I normally have to start with the locator-specification (css=, xpath=).
Permissions in this forum:
You cannot reply to topics in this forum