Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Version Defaults to Version 2 (WebDriver) #26

Open
jamiejackson opened this issue Jun 2, 2016 · 5 comments
Open

New Version Defaults to Version 2 (WebDriver) #26

jamiejackson opened this issue Jun 2, 2016 · 5 comments

Comments

@jamiejackson
Copy link
Collaborator

Now that I'm actually integrating @Lampei's/my pull request into a project, I notice a change that enables WebDriver ("version 2" mode) by default.

That means that existing tests will often fail, because RC and WebDriver don't have all of the same functionality.

Here's an example from ValidateThis (a consumer of CFSelenium):

    public void function beforeTests() {
        baseurl = "http://#cgi.server_name#:#cgi.server_port#";
        browserUrl = "#baseUrl#/validatethis/samples/FacadeDemo/";
        super.beforeTests();
        selenium.setTimeout(30000);
        crlf = chr(10);
    }

The super call would need to be changed to point back to the old version, in order for tests to work:

super.beforeTests(version=1, browserUrl=browserUrl);

It might have been better to preserve seamless backward compatibility by defaulting to v1 (RC), then folks could upgrade, when they see fit, to v2 (Webdriver) by changing their beforeTests() accordingly.

@Lampei, @ddspringle, et al,, thoughts?

@Lampei
Copy link
Collaborator

Lampei commented Jun 2, 2016

Makes sense to me. I think I probably did it this way for my local environment which never used the original. Better to not break everyone's existing tests 😀

@jamiejackson
Copy link
Collaborator Author

@Lampei, I'm confused about something:

This decides whether to use webSelenium or selenium, depending on arguments.

Whereas the v2 (WebDriver) tests seem to invoke selenium, not webSelenium.

Can you explain?

I was trying to write something up in the readme.md about how to use one or the other, but I got stuck trying to understand the existing code.

@Lampei
Copy link
Collaborator

Lampei commented Jun 3, 2016

@jamiejackson I think you are just seeing a poorly named class at the time. I'm not sure why I named it Web selenium as that appears to be the old code, right? Selenium is the new Web driver. I think I actually confused myself at times with the naming.

@jamiejackson
Copy link
Collaborator Author

Oh, that is confusing, but I see now. selenium.cfc=WebDriver and webSelenium.cfc=RC.

My first reaction would be to rename webSelenium.cfc to selenium.cfc (for backwards compatibility for folks who were invoking it directly), and rename selenium.cfc to WebDriverSelenium.cfc, or similar.

Thoughts?

@Lampei
Copy link
Collaborator

Lampei commented Jun 3, 2016

Yup. Default to backwards compatibility first again. Definitely try to disambiguate it (seeing as both you and I know what's going on and we're still getting confused by it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants