MCPcopy Create free account
hub / github.com/TestLeafInc/Simba / LeadPage

Class LeadPage

src/test/java/page/services/LeadPage.java:7–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5import page.base.SalesforceHooks;
6
7public class LeadPage extends SalesforceHooks{
8
9 public String fillMandatoryFields() {
10 String firstName = FakerDataFactory.getFirstName();
11 String lastName = FakerDataFactory.getLastName();
12 String companyName = FakerDataFactory.getCompanyName();
13 String salutation = FakerDataFactory.getSalutation();
14
15 chooseSalutation(salutation)
16 .typeFirstName(firstName)
17 .typeLastName(lastName)
18 .typeCompanyName(companyName)
19 .chooseLeadStatus()
20 .clickSave();
21
22 return salutation+" "+firstName+" "+lastName;
23 }
24
25 public LeadPage typeFirstName(String firstName) {
26 typeInputField("First Name", firstName);
27 return this;
28 }
29
30 public LeadPage typeLastName(String lastName) {
31 typeInputField("Last Name", lastName);
32 return this;
33 }
34
35 public LeadPage typeCompanyName(String companyName) {
36 typeInputField("Company", companyName);
37 return this;
38 }
39
40 public LeadPage chooseSalutation(String salutation) {
41 chooseByText("Salutation", salutation);
42 return this;
43 }
44
45 public LeadPage chooseLeadStatus() {
46 chooseByText("Lead Status", "Working - Contacted");
47 return this;
48 }
49
50 public LeadPage clickSave() {
51 click("(//button[text()='Save'])[1]", "Save");
52 return this;
53 }
54
55
56}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected