Instruction to mcp

Now please create a TestNG test for the Salesforce end-to-end Login + Create Account flow using 2 Page Object classes only:

  1. LoginPage.java
  2. AccountPage.java

Website:

Your Salesforce Login URL

Test name:

SalesforceCreateAccountTest


Please follow this user journey in the test:

1. Open the Salesforce login page

2. Login using LoginPage.java

Use:

  • Username: your_username
  • Password: your_password

3. Verify that Salesforce Home page is displayed

4. Navigate to Accounts using AccountPage.java

  • Open App Launcher (if needed)
  • Click Accounts

5. Wait for Accounts page to load properly

6. Click New button

7. Enter Account details:

  • Account Name: Test Account Automation
  • Phone: 9876543210
  • Website: https://example.com
  • Type: Customer - Direct
  • Industry: Technology

8. Click Save

9. Verify Account is created successfully

10. Verify Account Name appears on record page


Required Page Classes

LoginPage.java

Include methods:

  • openLoginPage()
  • enterUsername(String username)
  • enterPassword(String password)
  • clickLogin()
  • login(String username, String password)
  • isHomePageDisplayed()

AccountPage.java

Include methods:

  • openAccountsTab()
  • waitForAccountsPage()
  • clickNewAccount()
  • enterAccountName(String name)
  • enterPhone(String phone)
  • enterWebsite(String website)
  • selectType(String type)
  • selectIndustry(String industry)
  • clickSave()
  • isAccountCreated()
  • isAccountNameDisplayed(String name)

Rules:

  • Use only Page Object methods in test class
  • No direct WebDriver code inside test
  • Use TestNG assertions
  • Keep code simple and readable
  • Do not use Thread.sleep()
  • Use WebDriverWait / ExpectedConditions
  • Compatible with Angie Jones Selenium MCP style
  • Apply changes directly to project

Final Instruction:

Do not execute. Just create:

  • LoginPage.java
  • AccountPage.java
  • SalesforceCreateAccountTest.java

and wait for further instructions.


Post a Comment

0 Comments