-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add: Alias for find()
and findAll()
methods for new Element API. Fixes Issue - #4057
#4067
Conversation
@its-kunal This isn't what we want. We don't need to create multiple files of the same command to create aliases. The whole concept or motive behind having aliases is so that we can use the same command under different names without repeating the code for all the names. You'd need to explore the code more and see how can we associate different command names with the same code file. |
OK, is there any example of how to create aliases? It would be a great help. |
@garg3133 I have a question, where do we need to define the definition of alias methods? |
9ec4bf9
to
e4579ba
Compare
Hey @garg3133, I have removed extra files from the pull request. Also please help me where to add definitions of alias methods. |
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.
@its-kunal You're almost there.
Two things:
- Please test your changes by using these commands in one of Nightwatch's example tests (present in
examples/tests
directory). The following commands does not seem to be working:browser.element.findElements()
andbrowser.element.getAll()
. - Please revert back all the unrelated changes from
types/web-element.d.ts
file, this PR should only contain the changes that are related to this issue.
Hey @garg3133, Thanks for the feedback. I have made the changes that were asked.
|
hey @its-kunal there are still changes in the file |
Hey @dikwickley i have done the changes as asked. |
Hey @dikwickley any more changes required for this issue |
Can you try adding some more tests that test this alias? |
Hey @dikwickley, I think tests for aliases are already present in the file |
Hey @garg3133, @dikwickley, do i need to do any changes to this PR. |
Hello @its-kunal , it would be better if you add some tests also for the newly added commands. You can take reference from this PR #4107. |
@its-kunal Did you follow what I said in this comment? I don't see any implementation for |
Fixed in #4130, thanks! |
features/my-new-feature
orissue/123-my-bugfix
);This pull request will fix the issue - #4057