Timothy Flynn
2c9549cb76
Browser+WebContent+WebDriver: Move Get Title to WebContent
2022-11-11 22:03:23 +00:00
Timothy Flynn
7f142745e2
Browser+WebContent+WebDriver: Move Back, Forward, Refresh to WebContent
2022-11-11 22:03:23 +00:00
Timothy Flynn
ff6055e0a3
Browser+WebContent+WebDriver: Move Delete All Cookies to WebContent
2022-11-11 18:02:04 +00:00
Timothy Flynn
18abc6c85d
Browser+WebContent+WebDriver: Move Add Cookie to WebContent
...
The new implementation is made a bit simpler by way of TRY. It also
implements setting the SameSite attribute.
2022-11-11 18:02:04 +00:00
Timothy Flynn
a3d6c2f6af
Browser+WebContent+WebDriver: Move Get Named Cookie to WebContent
...
Instead of sending *all* cookies over IPC and filtering by name, we now
filter by name from the cookie jar and send just the first matching
cookie.
2022-11-11 18:02:04 +00:00
Timothy Flynn
31469ee45a
Browser+WebContent+WebDriver: Move Execute Async Script to WebContent
...
With this, WebDriverEndpoints is unused and removed :^)
2022-11-11 11:36:07 +00:00
Timothy Flynn
88dcdf681f
Browser+WebContent+WebDriver: Move Get Page Source to WebContent
2022-11-11 11:36:07 +00:00
Timothy Flynn
ea0561a0b3
Browser+WebContent+WebDriver: Move Take Element Screenshot to WebContent
2022-11-11 11:36:07 +00:00
Timothy Flynn
de1e882601
Browser+WebContent+WebDriver: Move Take Screenshot to WebContent
2022-11-11 11:36:07 +00:00
Timothy Flynn
93e14799c5
Browser+WebContent+WebDriver: Move Is Element Enabled to WebContent
2022-11-10 17:02:11 +00:00
Timothy Flynn
30d6a73d0e
Browser+WebContent+WebDriver: Move Get Element Rect to WebContent
2022-11-10 17:02:11 +00:00
Timothy Flynn
9dd62228c8
Browser+WebContent+WebDriver: Move Get Element Tag Name to WebContent
2022-11-10 17:02:11 +00:00
Timothy Flynn
5d32fd7026
Browser+WebContent+WebDriver: Move Get Element Text to WebContent
2022-11-10 17:02:11 +00:00
Timothy Flynn
06f1b8825c
Browser+WebContent+WebDriver: Move Get Element CSS Value to WebContent
2022-11-10 17:02:11 +00:00
Timothy Flynn
3c00d0e92b
Browser+WebContent+WebDriver: Move Get Element Property to WebContent
2022-11-10 17:02:11 +00:00
Timothy Flynn
1bc94e135f
Browser+WebContent+WebDriver: Move Get Element Attribute to WebContent
...
In doing so, this also implements a FIXME to handle boolean attributes.
2022-11-10 17:02:11 +00:00
Timothy Flynn
04ea3992e9
Browser+WebContent+WebDriver: Move Is Element Selected to WebContent
2022-11-10 17:02:11 +00:00
Timothy Flynn
560da56a1d
Browser+WebContent+WebDriver: Move Find Elements From Element to WC
...
This also lets us remove the element location strategy and some
WebContent IPC from Browser/LibWebView now that they are unused.
2022-11-10 13:10:16 +00:00
Timothy Flynn
03d0c7a5b6
Browser+WebContent+WebDriver: Move [Max,Min]imize Window to WebContent
...
This also lets us more fully implement the "iconify the window" method,
which requires we block until the document reaches the "hidden" state.
2022-11-09 19:59:26 +00:00
Timothy Flynn
b57d7e4332
Browser+WebContent+WebDriver: Move Get/Set Window Rect to WebContent
...
This also lets us more fully implement the "restore the window" method,
which requires we block until the document reaches the "visible" state.
2022-11-09 19:59:26 +00:00
Timothy Flynn
71aba39562
Browser: Remove unused WebDriver IPC endpoints
...
I had originally thought to just leave these and remove them all at once
at the end of the WebContent migration. But it is kind of confusing to
have them around, so this removes the endpoints that have already been
ported.
2022-11-09 19:59:26 +00:00
Timothy Flynn
b0eb45f7c7
WebDriver+Browser: Implement GET /session/{id}/element/{id}/screenshot
2022-11-05 01:10:03 +00:00
Timothy Flynn
2d75229192
WebDriver+Browser: Implement GET /session/{id}/element/{id}/selected
2022-11-03 19:40:43 -04:00
Timothy Flynn
0f2b4d0aac
WebDriver+Browser: Implement GET /session/{id}/element/{id}/enabled
2022-11-03 19:15:43 +00:00
Timothy Flynn
08c687ef20
WebDriver+Browser: Implement GET /session/{id}/element/{id}/rect
2022-11-03 19:15:43 +00:00
Timothy Flynn
61d0b66bfb
WebDriver+Browser: Implement GET /session/{id}/source
2022-11-03 14:48:04 +00:00
Linus Groh
747ba2a88f
Browser+LibWebView: Add WebDriver IPC plumbing for executing scripts
2022-11-02 23:46:30 +00:00
Timothy Flynn
1ffaad29e1
WebDriver+Browser: Implement GET /session/{id}/screenshot
...
This doesn't follow the spec to a tee. Our OutOfProcessWebView already
has a bitmap that can be used as the window screenshot. Therefore, we
can bypass the steps that assume we need to access the window's frame
buffer in-flight.
We also don't create an HTMLCanvasElement. We would need a Document in
the WebDriver process to do so. Instead, we can still run the encoding
steps exactly as-is using the screenshot bitmap.
2022-11-02 17:55:37 +00:00
Timothy Flynn
11d0489fa3
WebDriver+Browser: Implement POST /session/{id}/window/minimize
2022-11-02 15:41:19 +00:00
Timothy Flynn
89b2ff72f7
WebDriver+Browser: Implement POST /session/{id}/window/maximize
2022-11-02 15:41:19 +00:00
Timothy Flynn
174248678e
WebDriver+Browser: Implement POST /session/{id}/window/rect
2022-11-02 15:41:19 +00:00
Timothy Flynn
dac91c5790
WebDriver+Browser: Implement GET /session/{id}/window/rect
2022-11-02 15:41:19 +00:00
martinfalisse
76da0c6c54
WebDriver: Implement GET /session/{id}/element/{id}/text
endpoint
2022-11-01 10:55:34 +00:00
Tobias Christiansen
a534e61b44
WebDriver: Implement GET /session/{id}/element/{id}/name
endpoint
2022-10-22 13:44:49 +02:00
Sam Atkins
851bece9fc
Browser: Hide WebDriver debug messages behind WEBDRIVER_DEBUG
2022-10-21 19:59:03 +02:00
Tobias Christiansen
c11462f40e
WebDriver: Introduce a WebDriverEndpoints
class
...
This holds the Functions used by the WebDriver to not clutter up the
`Tab.h` file.
2022-10-20 21:48:12 +02:00
Tobias Christiansen
354a845d65
WebDriver: Implement GET /session/{id}/element/{id}/css/{name}
2022-10-20 21:26:10 +02:00
Tobias Christiansen
e87456e38f
WebDriver: Implement GET /session/{id}/element/{id}/property/{name}
2022-10-19 22:30:06 +02:00
Tobias Christiansen
249350a7a3
WebDriver: Implement GET /session/{id}/element/{id}/attribute/{name}
2022-10-19 17:30:58 +02:00
Tobias Christiansen
e6f71d5e05
WebDriver: Fix broken Optional<> returns through IPC
2022-10-19 15:32:31 +02:00
Tobias Christiansen
5d762bd448
WebDriver+Friends: Add IPC and plumbing for Element-getting
...
This extends the IPC calls `get_document_element` and
`query_selector_all` to be usable by the WebDriver. For this the
`WebDriverConnection` provides the same interfaces and takes care of
routing the data through the Browser.
2022-10-18 19:18:33 +02:00
Tobias Christiansen
61dd7d5d86
WebDriver: Add/Expand some dbgln's
...
`update_cookie` was missing a dbgln and not all functions getting
arguments printed them.
2022-10-17 15:48:22 +02:00
Tobias Christiansen
122e2d2076
WebDriver: Implement POST /session/{id}/cookie
endpoint
...
This allows the WebDriver to create a cookie.
We use a Web::Cookie::ParsedCookie to transport the data through IPC
to take advantage of the RFC6265 Section 5.3 implementation in the
CookieJar.
2022-10-17 15:48:22 +02:00
Tobias Christiansen
c710780852
Browser: Add update_cookie
WebDriver IPC endpoint
...
Through this the WebDriver will be able to change cookies. Needed for
deleting cookies.
2022-10-17 11:31:30 +02:00
Tobias Christiansen
a34f8c444b
WebDriver: Implement GET /session/{id}/cookie/{name}
endpoint
2022-10-16 16:32:59 +02:00
Tobias Christiansen
001699f2d6
WebDriver: Implement GET /session/{id}/cookie
endpoint
2022-10-15 22:28:34 +02:00
Moustafa Raafat
a4fa604bde
WebDriver: Implement POST /session/{id}/forward endpoint
2022-10-15 21:01:59 +02:00
Moustafa Raafat
9132656856
WebDriver: Implement POST /session/{id}/back endpoint
2022-10-15 21:01:59 +02:00
Tobias Christiansen
1179d951f6
WebDriver: Implement POST /session/{id}/refresh
endpoint
2022-10-15 15:43:42 +01:00
Sam Atkins
8c0f1da9f7
Browser: Add a basic WebDriver API
...
This adds a new option "--webdriver" that opens a local unix socket
in /tmp/browser_{pid} which the WebDriver server can use to send
commands to the Browser instance.
Co-authored-by: Florent Castelli <florent.castelli@gmail.com>
2022-10-12 23:07:42 +02:00