Lurker News

Comments (106) 29 threads

Show all comments

Showing thread 2 of 29

zabil4 replies#
This looks great.

I also want to shamelessly plug something similar I am working on, Taiko, it uses javascript and comes with a REPL that generates scripts like.

  await openBrowser();
  await goto("http://todomvc.com/examples/react/#/");
  await write("automate with taiko");
  await press("Enter");
  await click(checkBox(near("automate with taiko")));
The reason we use a javascript is familiarity, IDE support and use of existing node js libraries for testing.

For anyone who's interested
https://github.com/getgauge/taiko

hliyan1 reply#
I was very impressed by this! Great minds think alike. Would love more feedback if you have any.
zabil1 reply#
For sure!

Here are a few things we learned after getting feedback from users.

  * Minimise or better remove all pre-requisites npm install should bring in everything.
  * Talk directly to the browser using the Chrome DevTools protocol it's not that hard and is now supported by firefox.
  * Play well with others in a language ecosystem for example if javascript, test runners like gauge, jest, mocha and assertion libraries like chai etc do not build these capabilities.
  * Run well in headless environments.
All the best!
hliyan#
Much obliged! Thanks for taking the time to respond.
DailyHN1 reply#
Your sample code looks like a puppeteer script.
zabil1 reply#
Close, but Taiko has a flat API. For reference here's a script in puppeteer

  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  await page.screenshot({path: 'example.png'});

  await browser.close();
and the same thing in Taiko

  await openBrowser()
  await goto('https://example.com');
  await screenshot({path: 'example.png'});
  await closeBrowser();
Normal_gaussian3 replies#
so I can't work on multiple pages in parallel?

Continue this thread — 3 replies

mherrmann1 reply#
Helium author here. Thank you for mentioning us as an inspiration!
zabil#
Big fans. Thanks for creating Helium!