splinter icon indicating copy to clipboard operation
splinter copied to clipboard

the road to splinter 1.0

Open andrewsmedina opened this issue 8 years ago • 7 comments

the road to splinter 1.0

splinter has 8 years but it's still in a minor version. :(

This issue is a way to share a plan with all everyone that uses and contributes with splinter to make the 1.0 release and start following the semantic versioning afterwards.

The idea is to stabilize the API on 1.0 version keeping the python 2 and 3 support and drop python 2 support on 2.0 version.

TODO list for splinter 1.0:

  • fix critical bugs and inconsistencies like (issue #509)
  • improve docs coverage
  • remove phantomjs support and improve firefox/chrome headless tests and docs (we should release a deprecation warning for phantomjs in 0.8, and remove it on 0.9.)
  • support for python 2 and 3
  • add deprecation warning for python 2
  • stabilize tests

splinter 2.0

  • drop support for python 2

What do you think about it?

After this we will create a Milestone with all the issues discussed here to wrap up the discussion.

andrewsmedina avatar Mar 26 '18 19:03 andrewsmedina

It would be great if we can implement the following for 1.0:

  1. Get headless mode working on remote webdriver.
  2. Support mouse actions on remote webdriver. I've already verified ActionChains works on remote webdriver for Firefox with Selenium's API, but Splinter's mouse actions errors that its not supported.
  3. Some times is_text_present() doesn't detect the text even when timeout is set (e.g. when testing React's virtual DOM). We should try to use Selenium's API (Explicit Wait & Expected Condition) as much as possible for all detections and interactions since Selenium is updated frequently e.g.
from selenium.webdriver.support import expected_conditions as EC

wait = WebDriverWait(driver, 10)
wait.until(EC.text_to_be_present_in_element((By.ID, 'someid'), 'some_text'))

j7an avatar Mar 28 '18 17:03 j7an

@j7an these are great feature. Can you create issues for these features?

I believe that this feature will not break the Splinter API. So we can release them as 1.x releases.

What do you think about it?

andrewsmedina avatar Mar 29 '18 03:03 andrewsmedina

Hi, I've just setup Splinter since it was linked from behave-django. To my disappointment, it doesn't seem to execute my React project, and searching through Splinter's issues, I found this thread and @j7an's comment

Some times is_text_present() doesn't detect the text even when timeout is set (e.g. when testing React's virtual DOM).

I'm not clear yet if Splinter doesn't support React-like projects or not (it doesn't make sense that it wouldn't), and still investigating my test environment.

In any case, I've noticed that you created the Milestone for v1, but there is no deadline fixed yet. Couldn't find more details than this post regarding the roadmap either. Can you give us an update regarding the current progress and roadmap estimations ?

Thanks a lot!

AdrienLemaire avatar Jan 23 '19 07:01 AdrienLemaire

@Fandekasp I'm not sure when the requested features will be implemented in splinter. In the mean time you can take a look at thewaiter repo. It's written in Java but I've re-written some functions in Python and my tests seem to work well for React projects.

I think the issue is that React continuously updates the DOM so Selenium waits forever for the DOM to finish loading. So the idea for Selenium is to:

  1. Do something e.g. Click a button or link
  2. Wait for the expected result to happen e.g. A new page loaded
  3. If the expected result does not happen, then go back to step 1 until timeout

The Waiting Game – How To Design Reliable Selenium Tests - Corina Pip – NTT Data (Youtube)

j7an avatar Jan 23 '19 16:01 j7an

Thanks for the reply. Got it, I won't try to test React's virtual DOM :)

I confirm that I fixed my setup (thanks selenium-hub debug mode with vnc) and can interact with my React project from behave-django with Splinter's remote webdriver. Thanks again for Splinter !

AdrienLemaire avatar Jan 24 '19 01:01 AdrienLemaire

@andrewsmedina The following version 1.0 issues could probably be closed. #166 #333 #455 #520 #579

jsfehler avatar Jun 28 '19 18:06 jsfehler

I've investigated #172 briefly and it appears to be a unicode encoding issue. I think it should be up to the user to encode their strings as utf-8.

jsfehler avatar Jun 28 '19 18:06 jsfehler