Automation in plain English
We will continue to further modify our custom methods by allowing two different types of classes to be passed. Our methods still support a WebdriverIO WebElement
, but now, we will enhance them with a string. For example, let’s say we want to click the HALLOWEEN PARTY button at the top of the CandyMapper site. Consider this code:

Figure 11.1 – A DevTools view of the HALLOWEEN PARTY link
Here is the POM approach to find the link:
public get btnHalloweenParty () { return $(`#nav-55206 > li:nth-child(2) > a`); } Helpers.clickAdv (btnHalloweenParty);
By using the echo location superpower, this line of code could be smart enough to find the proper link with just this:
Helpers.clickAdv ("Halloween Party");
Alternatively, you could enter an email into a field:
Helpers.setValueAdv ("Email", "me@mydomain.com");
You could also add a total of two guests to...