Open igniteram opened 6 years ago
I found google chrome's puppeteer which would help achieve this, would start exploring it.
OMG! Nice find! Going to try it out this weekend.
Cool. We can get the content of the page with:
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({headless: false});
const page = await browser.newPage();
await page.goto('http://www.example.com', {waitUntil: 'networkidle2'});
let content = await page.content();
console.log(content);
// await browser.close();
})();
We could get the input
, button
, and a
html from the content.
Yup, I did see the search.js
example of puppeteer. We can get the page objects with this approach but the tricky part is most of the user applications will have a login page. So I was wondering how to handle that with cliptor? Any suggestions?
ok I got one approach, Add a new command cliptor generate
which would ask for the specific page and whether login credentials are required, if yes then interactively cliptor will fetch the login credentials and then pass it to puppeteer
to do its magic!
As per the suggestion given by @cnishina , make cliptor generate common elements of the web page under test like - links, buttons, texts etc.