rickypc / selenium-page-object-generator

A nimble and flexible Selenium Page Object Model generator to improve agile testing process velocity.
https://chrome.google.com/webstore/detail/epgmnmcjdhapiojbohkkemlfkegmbebb
GNU Affero General Public License v3.0
121 stars 65 forks source link

Valid C#/java literals #21

Closed jeshan closed 6 years ago

jeshan commented 7 years ago

In some cases, like when dealing with version names, rendered template may produce invalid java or c# variable names.

    @FindBy(css = "a[href='/rickypc/selenium-page-object-generator/tree/1.0.1']")
    @CacheLookup
    private WebElement 101;

    @FindBy(css = "a[href='/rickypc/selenium-page-object-generator/tree/1.0.2']")
    @CacheLookup
    private WebElement 102;

This PR is to fix this. I have prefixed the variable names with an underscore:

    @FindBy(css = "a[href='/rickypc/selenium-page-object-generator/tree/1.0.1']")
    @CacheLookup
    private WebElement _101;

    @FindBy(css = "a[href='/rickypc/selenium-page-object-generator/tree/1.0.2']")
    @CacheLookup
    private WebElement _102;
rickypc commented 6 years ago

Released in version 1.3.0. Thanks, @jeshan for your contribution.