You can chain the commands on other Nightmare, Chromeless etc. You can provide selector along with type(). Like the following. A total of 188 characters. The chain methods are still doable with the seperate awaits.
const awesomeness = await chromeless
.goto('https://example.com')
.type("*****", "#login_username")
.type("*****","#login_password")
.click("button")
.wait(20000)
.screenshot()
for the same thing we have to write the await multiple times. A total of 244 characters.
await page.goto('https://example.com');
await page.click("#login_username")
await page.type("*****")
await page.click("#login_password")
await page.type("*****")
await page.click(" button")
await page.waitFor(2000)
await page.screenshot({path: 'screenshot.png'});
What should be done to achieve the chain methods for clean coding and innerpeace?
You can chain the commands on other Nightmare, Chromeless etc. You can provide selector along with type(). Like the following. A total of 188 characters. The chain methods are still doable with the seperate awaits.
for the same thing we have to write the await multiple times. A total of 244 characters.
What should be done to achieve the chain methods for clean coding and innerpeace?