1
私はAngular2プロジェクトをテストするためにPhantomJSで分度器を使用しています。 Chromeで実行すると、私のテストはうまく合格し、しかしPhantomJSと私はそうのようなラベルを選択するためにCSSセレクタを使用しようとしているテストでエラーが発生します:分度器/ PhantomJSはラベルを選択しようとするとDOM例外12を返します
私が手にエラーがある:
Failed: {"errorMessage":"SyntaxError: DOM Exception 12","request":{"headers":{"Accept-Encoding":"gzip,deflate","Connection":"Keep-Alive","Content-Length":"74","Content-Type":"application/json; charset=utf-8","Host":"localhost:15995","User-Agent":"Apache-HttpClient/4.5.1 (Java/1.8.0_101)"},"httpVersion":"1.1","method":"POST","post":"{\"using\":\"css selector\",\"value\":\"label[for=\\\"my-id\\\"\"}","url":"/elements","urlParsed":{"anchor":"","query":"","file":"elements","directory":"/","path":"/elements","relative":"/elements","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/elements","queryKey":{},"chunks":["elements"]},"urlOriginal":"/session/3e10b5e0-d873-11e6-830b-4d293c6fcef6/elements"}}
「DOM例外12」をグーグルで、それがどのようにIDセレクタに関連seems to be使用されているが、私はそれを使用している道が正しいと信じて:
<label for="my-id">My Label</label>
<input id="my-id" type="text" ... />
任意の考え?
天才を、ありがとうございました。 –