Skip to content
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

Implement all webdriver commands. #8623

Open
Ms2ger opened this issue Nov 20, 2015 · 16 comments
Open

Implement all webdriver commands. #8623

Ms2ger opened this issue Nov 20, 2015 · 16 comments

Comments

@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented Nov 20, 2015

@Ms2ger
Copy link
Contributor Author

@Ms2ger Ms2ger commented Nov 20, 2015

  • AcceptAlert
  • AddCookie(AddCookieParameters)
  • Close
  • DeleteCookies #23006
  • DeleteCookie(String)
  • DeleteSession
  • DismissAlert
  • ElementClear(WebElement)
  • ElementClick(WebElement)
  • ElementTap(WebElement)
  • FindElementElements(WebElement, LocatorParameters)
  • FindElementElement(WebElement, LocatorParameters)
  • GetAlertText
  • GetCookies
  • GetCookie(String)
  • GetCSSValue(WebElement, String)
  • GetElementRect(WebElement)
  • GetWindowSize #8661
  • IsDisplayed(WebElement)
  • IsEnabled(WebElement) #8661
  • IsSelected(WebElement) #8661
  • MaximizeWindow
  • SendAlertText(SendAlertTextParameters)
  • SetWindowSize(WindowSizeParameters) #11179
  • SwitchToWindow(SwitchToWindowParameters)
@craftytrickster
Copy link
Contributor

@craftytrickster craftytrickster commented Nov 22, 2015

Is it safe to say that servo/components/webdriver_traits/lib.rs should be deleted since it seems to be a duplicate of servo/components/msg/webdriver_msg.rs and I do not see any usages of it?

@jdm
Copy link
Member

@jdm jdm commented Nov 22, 2015

Yep!

@craftytrickster
Copy link
Contributor

@craftytrickster craftytrickster commented Nov 22, 2015

I would like to try the following four:

GetWindowSize
IsDisplayed(WebElement)
IsEnabled(WebElement)
IsSelected(WebElement) 

However, if possible, I do have a few questions:
Getting a reference to the web element seems easy enough, I can copy what is being done in webdriver_handlers.rs, for example in the handle_get_name function. However, once I have it, do I have to check get_enabled_state for isEnabled and get_focus_state for isSelected? What would the check for isDisplayed?

Also, I created a branch with a commit to implement the GetWindowSize, but I am not sure how to correctly convert the WindowSizeData to a correct WebDriverResponse. Does anyone have a suggestion?
craftytrickster@5c2e3e3#diff-a1d91ab451658c0134bb24f8f406dccbR360

I'd appreciate the help, thank you.

@jdm
Copy link
Member

@jdm jdm commented Nov 22, 2015

@jdm
Copy link
Member

@jdm jdm commented Nov 22, 2015

@jdm
Copy link
Member

@jdm jdm commented Nov 22, 2015

And the window size response should be constructed according to https://w3c.github.io/webdriver/webdriver-spec.html#dfn-get-window-size .

@craftytrickster
Copy link
Contributor

@craftytrickster craftytrickster commented Nov 22, 2015

@jdm thanks!

@jgraham
Copy link
Contributor

@jgraham jgraham commented Nov 24, 2015

Yeah, don't implement IsDisplayed. There isn't a correct way to do that at the moment (or possibly ever), and so we are pushing the application-specific approximation into the client for now.

bors-servo added a commit that referenced this issue Nov 29, 2015
…=jgraham

Webdriver - GetWindowSize/IsEnabled/IsSelected

Added handlers for #8623:
GetWindowSize
IsEnabled(WebElement)
IsSelected(WebElement)

I am not sure how to actually verify my webdriver code works, if someone can give advice I would make the necessary changes.

Thanks!

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8661)
<!-- Reviewable:end -->
@craftytrickster
Copy link
Contributor

@craftytrickster craftytrickster commented Dec 1, 2015

Do the alert items such as GetAlertText only deal with alerts or do they also deal confirm/prompt alerts as well? I ask because I only see Alert on the window methods, I do not see any mention of confirm/prompt. Should confirm/prompt be ignored for now?

Edit: After looking at this some more, it seems to me that only SendAlertText is possible with the current window api available.

@Ms2ger
Copy link
Contributor Author

@Ms2ger Ms2ger commented Dec 2, 2015

confirm/prompt aren't implemented, and probably won't be for quite a while, so do ignore them.

@dlrobertson
Copy link
Contributor

@dlrobertson dlrobertson commented Feb 19, 2016

I'd like to take a crack at this! If it is okay with everyone, I have an idea as to where to start with GetElementRect, so I'd like to start with it.

Let me know at dlr on #servo if you have any tips or if you have an aversion to me trying this (I'm 100% okay with doing something different if so). If not, I'll probably have my first attempt at a PR sometime this evening.

@jdm
Copy link
Member

@jdm jdm commented Feb 19, 2016

Please do! You can test this by running servo with --webdriver [port_number] and playing with the python webdriver client in tests/wpt/harness/wptrunner/executors/webdriver.py.

dlrobertson added a commit to dlrobertson/servo that referenced this issue Feb 20, 2016
Implement the webdriver Get Element Rect command
dlrobertson added a commit to dlrobertson/servo that referenced this issue Feb 20, 2016
Implement the webdriver Get Element Rect command
dlrobertson added a commit to dlrobertson/servo that referenced this issue Feb 20, 2016
Implement the webdriver Get Element Rect command
dlrobertson added a commit to dlrobertson/servo that referenced this issue Feb 20, 2016
Implement the webdriver Get Element Rect command
dlrobertson added a commit to dlrobertson/servo that referenced this issue Feb 20, 2016
Implement the webdriver Get Element Rect command
dlrobertson added a commit to dlrobertson/servo that referenced this issue Feb 21, 2016
Implement the webdriver Get Element Rect command
dlrobertson added a commit to dlrobertson/servo that referenced this issue Feb 21, 2016
Implement the webdriver Get Element Rect command
bors-servo added a commit that referenced this issue Feb 25, 2016
Implement GetElementRect webdriver command: #8623

Implement the webdriver Get Element Rect command. Originally I wrote out the algorithm for [Step 7](https://w3c.github.io/webdriver/webdriver-spec.html#dfn-calculate-the-absolute-position) and then I found `GetBoundingClientRect`, and i thought it was probably best to use it instead.

As always, feedback is very welcomed!

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9708)
<!-- Reviewable:end -->
@asajeffrey asajeffrey mentioned this issue May 13, 2016
4 of 5 tasks complete
@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented May 13, 2016

#11179 implements SetWindowSize.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented May 18, 2016

A couple of related issues: #11254 (support webdriver actions) and #11253 (support webdriver sessions).

@dlrobertson
Copy link
Contributor

@dlrobertson dlrobertson commented May 21, 2016

#10826 implements AddCookie, GetCookie, and GetCookies and has been rebased.

jrmuizel pushed a commit to jrmuizel/gecko-cinnabar that referenced this issue Jun 12, 2017
…from craftytrickster:8623/some-webdriver-commands); r=jgraham

Added handlers for servo/servo#8623:
GetWindowSize
IsEnabled(WebElement)
IsSelected(WebElement)

I am not sure how to actually verify my webdriver code works, if someone can give advice I would make the necessary changes.

Thanks!

Source-Repo: https://github.com/servo/servo
Source-Revision: a877a56e0e603c6cc8e9f951c2ad14b6fe8f9b62
@aditj aditj mentioned this issue Mar 9, 2019
4 of 5 tasks complete
bors-servo added a commit that referenced this issue Apr 19, 2019
Added WebDriver DeleteCookies Function

<!-- Please describe your changes on the following line: -->
This change adds DeleteCookies function of the webdriver crate to the servo webdriver server.
See [spec](https://w3c.github.io/webdriver/#delete-all-cookies)

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix part of #8623 (GitHub issue number if applicable)

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23006)
<!-- Reviewable:end -->
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 1, 2019
…from craftytrickster:8623/some-webdriver-commands); r=jgraham

Added handlers for servo/servo#8623:
GetWindowSize
IsEnabled(WebElement)
IsSelected(WebElement)

I am not sure how to actually verify my webdriver code works, if someone can give advice I would make the necessary changes.

Thanks!

Source-Repo: https://github.com/servo/servo
Source-Revision: a877a56e0e603c6cc8e9f951c2ad14b6fe8f9b62

UltraBlame original commit: d196549e27c9fc2de4f5fedd47341925fed2ed2c
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…from craftytrickster:8623/some-webdriver-commands); r=jgraham

Added handlers for servo/servo#8623:
GetWindowSize
IsEnabled(WebElement)
IsSelected(WebElement)

I am not sure how to actually verify my webdriver code works, if someone can give advice I would make the necessary changes.

Thanks!

Source-Repo: https://github.com/servo/servo
Source-Revision: a877a56e0e603c6cc8e9f951c2ad14b6fe8f9b62

UltraBlame original commit: d196549e27c9fc2de4f5fedd47341925fed2ed2c
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
…from craftytrickster:8623/some-webdriver-commands); r=jgraham

Added handlers for servo/servo#8623:
GetWindowSize
IsEnabled(WebElement)
IsSelected(WebElement)

I am not sure how to actually verify my webdriver code works, if someone can give advice I would make the necessary changes.

Thanks!

Source-Repo: https://github.com/servo/servo
Source-Revision: a877a56e0e603c6cc8e9f951c2ad14b6fe8f9b62

UltraBlame original commit: d196549e27c9fc2de4f5fedd47341925fed2ed2c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.