Share
View previous topicGo downView next topic
theYoRecords
Posts : 2
Join date : 2012-10-26

Locators in WebDriverBackedSelenium

on 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!
tarun3kumar
Master
Master
Posts : 186
Join date : 2012-02-14
http://seleniumtests.com

Re: Locators in WebDriverBackedSelenium

on Tue Dec 04, 2012 2:15 pm
Are you migrating from Sel1 to Sel2 ?
Also can you try - wdb.Click("'test'");

_________________
Thanks
Tarun K
Free Selenium Training
theYoRecords
Posts : 2
Join date : 2012-10-26

Re: Locators in WebDriverBackedSelenium

on 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=).
Sponsored content

Re: Locators in WebDriverBackedSelenium

View previous topicBack to topView next topic
Permissions in this forum:
You cannot reply to topics in this forum