I know there are the Selenium IDE and the Selenium Builder as a Firefox plugin to record actions and export them e.g. as C#-Code.
But is there also a tool which helps you with creating Selenium (2) WebDriver Test-Code following the PageObject pattern? I know that this would be difficult, because the program would have to know how the abstractions should be implemented.
Such a tool doesn't exist as far as I know? But what would be the best way to create Selenium WebDriver PageObject-Code, supported by a tool?
Maybe using the Selenium builder just to create references by id, class name etc. and manually implementing them in my code? This could be a bit faster than deciding on my own what would identify an element precisely. But why did the developers of Selenium Builder create the element references dynamically
IWebDriver wd = new RemoteWebDriver(DesiredCapabilities.Firefox());
wd.FindElement(By.Id("NameField")).Click();
wd.FindElement(By.Id("NameField")).Clear();
and not with the FindBy attribute ?
[FindsBy(Using = "NameField")]
public IWebElement nameField;
The elements would be reusable and the code would be shorter.