Fix for npe in taxi-api. #90

Closed
wants to merge 1 commit into from

2 participants

@bonega

Most of the taxi element-functions will return nil if the element is missing.
Operations ex. click will return true upon completion.
"elements" return an empty vector if there are no matches.

Hopefully fixes #85

@bonega bonega Fix for npe in taxi-api.
Most of the taxi element-functions will return nil if the element is missing.
Operations ex. click will return true upon completion.
"elements" return an empty vector if there are no matches.
08649ad
@semperos
Owner

This is quite the pull request. Thank you!!

I'm going to take a little time to review this. The idea of #85 was not only to fix this for the Taxi API, but more importantly for the Core API on which everything else is based. I'll take a look at how this would integrate with that approach and hopefully merge this in.

@semperos

Better style here would be:

(is (nil? (element missing)))

This applies to all uses of (= (nil ...)) below as well.

Quite right.
As for now I will wait for more feedback from you before I push anything.

@bonega

Are there anything I can do to help?

@semperos
Owner

Sorry, my family and I moved recently and it's just been a stressful time getting settled down again.

I will try to get the entire null-handling in clj-webdriver fixed before the end of January. As I mentioned, it needs to be solved at the bottom-most level of the API.

@semperos
Owner

I've looked at your pull request in more detail. In light of recent conversation over in Issue #85, which has to do with how Clojure core itself will be changing, I don't think this approach will quite fit. I'll keep this issue open until I close #85 in case it is applicable.

@semperos
Owner

This and #85 fixed with release 0.6.0-beta3

@semperos semperos closed this Feb 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment