Re: Testing WebDriver in Web Platform Tests

On 24/01/17 17:41, Sam Uong wrote:
> Hi Mike,
> My immediate thought is that we want to avoid a few things:
>    1. code duplication - particularly for more complex parameters, such as
>    those described in the Actions section of the spec
>    2. injecting errors - how easy will it be to test error conditions by
>    sending malformed requests?
> It's hard to say more without seeing code, so I'm looking forward to seeing
> your examples :). I'd suggest having at least two cases, one with a simple
> test case (e.g. navigating to a URL) and another with a complex request
> object (e.g. set up an action chain and execute it).

The intent of the wdclient library is to make it easy to do "normal" 
things in which the protocol syntax is followed, and possible to do 
unusual things in which the syntax of commands is not followed. I 
suspect that trying to recreate the tests using the raw protocol for 
everything makes tests that are mostly concerned with semantics overly 
hard to write (consider e.g. a test that involve loading a url, finding 
some element and using actions to perform complex manipulations, and 
then some more commands to verify the result).

That said, if you have an alternate approach that makes it possible to 
write more involved tests without undue effort I am of course interested 
to see what that looks like.

Received on Tuesday, 24 January 2017 17:53:17 UTC