-
Notifications
You must be signed in to change notification settings - Fork 2.3k
chore(elementArrayFinder): separate elementFinder into its own file #1633
Conversation
CLAs look good, thanks! |
@@ -0,0 +1,944 @@ | |||
var util = require('util'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why this can't be two files - one for ElementFinder
and one for ElementArrayFinder
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it could be two files. Just figured they're so tightly bound, it's easier to put them in one file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it would make things more complex don't bother, I was just thinking that it's easier conceptually for me to have one file per object to return.
If you're going to have one file for both, maybe a different file name though? The name elementArrayFinder.js
suggests that someone might write var ElemenetArrayFinder = require('./elementArrayFinder.js')
. I might try something like elementFinders.js
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it in one file (they are tightly bound) and call it element.js
(matches what the test file is called, encompasses both)
LGTM |
LGTM after file name change |
Closed via 015cafc |
Hi I was wondering if someone can explain the proper method of extending ElementFinder and ElementArrayFinder, I see this issue was merged in awhile ago, but Im using protractor 2.5.1, and I have experimented with the latest protractor and I can't seem to extend either unless I use the work around described in the linked issue. |
Please ask support questions on Stack Overflow |
Hi I have asked this question on StackOverflow with no luck. Can you please explain how I can override the selenium functions that are in ElementArrayFInder, WEB_ELEMENT_FUNCTIONS. I specifically looking to override the click function, but may in the future look at others. |
protractor.js is growing very big. This separates ElementFinder/ElementArrayFinder (which really don't belong to the protractor class) into its own file.
Also helps with unit testing in the future by injecting a mock ptor object.