-
Notifications
You must be signed in to change notification settings - Fork 2.3k
sendKeys example uses webdriver.Key instead of protractor.Key #1567
Comments
This is because we grab the documentation directly from webdriver - @sjelin if we could do something smarter here, that would be great. Not sure we want to actually modify the webdriver documentation, but maybe have notes about it? |
I don't actually see any changes on the page I mentioned, but maybe the update hasn't been made public yet (or maybe the change was made to some other page). |
It was a little while before we pushed the fixed version, but it's up now |
Are you sure? I don't actually see any changes to the page I mentioned in opening the issue, but maybe I am missing something. |
I think you just need to reload the page |
Actually, I did try reloading the page, trying a different browser, and (tonight) a different network to eliminate the possibility of some proxy caching the old version. I still don't see the change. If you decided not to change the page, that is fine -- and I don't mean to complain -- but you seem to think you have fixed the issue I mentioned. I am sure you fixed something, but not the instance I reported. To reiterate what I send in my initial report, on the page http://angular.github.io/protractor/#/api?view=webdriver.WebElement.prototype.sendKeys I am seeing the text webdriver.Key.CONTROL in the example, when protractor.Key.CONTROL is what is really available. I was looking to see either that change, or some explanation on the page that when we read "webdriver.Key" we should mentally subtitute "protractor.Key". But, if there is some other way in which you have addressed the issue on the page, let me know what I should be looking for. |
I think Sammy was referring to a different issue - I don't think we actually modify the docs from webdriver now. Maybe we should consider exporting the webdriver namespace as |
Sorry, yeah, I was confused. We could just run |
@juliemr Which approach would you prefer? The (probably imperfect) regex or the (potentially breaking) |
@juliemr If you don't express a preference by EOD I'm just gonna go with the regex 😛 |
In the end I decided to just put a disclaimer at the top of each page which uses webdriver syntax. Automatically converting the syntax from webdriver to protractor wasn't going to work. |
See #2169 |
On the sendKeys API page, the example reads " element.sendKeys("text was", webdriver.Key.CONTROL, ...." When I tried something like that, I got an error that webdriver was not defined. It took me a while before I found that I could use protractor.Key.CONTROL instead.
The text was updated successfully, but these errors were encountered: