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

Testdriver calls cannot return any values #10716

Open
kereliuk opened this Issue Apr 30, 2018 · 8 comments

Comments

Projects
None yet
4 participants
@kereliuk
Contributor

kereliuk commented Apr 30, 2018

Currently there is no capability in the infrastructure for testdriver to return any information after the call.

For instance, if we want to use testdriver to get the current window size, there is no way to return that information to the testharness.

@kereliuk kereliuk self-assigned this Apr 30, 2018

@jgraham

This comment has been minimized.

Contributor

jgraham commented Apr 30, 2018

I agree that could be a problem, but the motivating example isn't very covincing. In particular, why is a test changing the browser window size? What's the use case that you're trying to solve?

@kereliuk

This comment has been minimized.

Contributor

kereliuk commented Apr 30, 2018

I suggest we solve this by getting the action handler to return the value the protocol part returns. Then serialize it and send it with the "complete" message of the action.

@gsnedders @jgraham WYT?

This should probably work pretty seamlessly with simple data types (booleans, integers)

@jgraham

This comment has been minimized.

Contributor

jgraham commented Apr 30, 2018

(and the APIs to get window size are all content-accessible anyway; if we end up testing DOM methods with webdriver implementations that use those DOM methods under the hood, that's pretty circular)

@gsnedders

This comment has been minimized.

Contributor

gsnedders commented May 8, 2018

From IRC:

15:05 < gsnedders> kereliuk: what's the plan with #10716?
15:30 < kereliuk> gsnedders: I have something on a local branch that works at least for the window commands I've sent PRs for
15:31 < kereliuk> I have the protocol method return a python thing. Serialize that with json.dumps and throw it in the completion message.
15:31 < kereliuk> Then use JSON.parse to put it back into the JS object and attach it to the pending_resolve
15:31 < kereliuk> WYT?

Will respond below…

@gsnedders

This comment has been minimized.

Contributor

gsnedders commented May 9, 2018

@jgraham I don't know about size, but certainly other things related to window management are necessary for testing things like the Page Visibility API.

@gsnedders

This comment has been minimized.

Contributor

gsnedders commented May 16, 2018

@kereliuk yeah, that probably seems as reasonable as anything else (sorry, I got distracted by getting off the train a week ago!)

@foolip

This comment has been minimized.

Contributor

foolip commented Jul 18, 2018

@kereliuk, is this still needed for some API? Is it blocking #10749 and #10747?

@foolip

This comment has been minimized.

Contributor

foolip commented Sep 14, 2018

Demoting this to backlog as it's not clear which APIs we need it for. Existing PR is at #11080 and can be revived when needed for some other work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment