schickling/chromeless

Feature request: api for DOM selectors using css

Open

#160 建立於 2017年8月3日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)TypeScript (606 fork)batch import
APIfeaturehelp wanted

倉庫指標

Star
 (13,240 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

I have been testing E2E tools this week and I was quite excited when I discovered this project.

Just my two cents, I don't know if any of you guys know about TestCafe, but they have a very cool way to create selectors for DOM nodes.

import { Selector } from 'testcafe';

// A selector is created from a CSS selector string.
const submitButton = Selector('#submit-button');

then you can just use that on your tests:

.wait(submitButton)
.click(submitButton)

But the beauty of that API is that you can create plugins around that. They also managed to create another tool around the selectors a plugin for React

const myDiv = ReactSelector('TodoApp div');

I guess this would solve a lot of requests similar to https://github.com/graphcool/chromeless/issues/134

貢獻者指南