Test Overview
This test checks if Postman is installed correctly and if the main interface elements are visible and functional. It verifies that the app opens, the workspace loads, and key buttons like 'New' and 'Send' are present.
This test checks if Postman is installed correctly and if the main interface elements are visible and functional. It verifies that the app opens, the workspace loads, and key buttons like 'New' and 'Send' are present.
import unittest from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC class TestPostmanInstallationInterface(unittest.TestCase): def setUp(self): # Assuming Postman web app is accessible for testing self.driver = webdriver.Chrome() self.driver.get('https://web.postman.co/') def test_postman_interface_elements(self): driver = self.driver wait = WebDriverWait(driver, 15) # Wait for workspace to load by checking presence of 'New' button new_button = wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, 'button[aria-label="New"]'))) self.assertTrue(new_button.is_displayed(), "New button should be visible") # Check if 'Send' button is present in the request builder send_button = wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, 'button[aria-label="Send"]'))) self.assertTrue(send_button.is_enabled(), "Send button should be enabled") def tearDown(self): self.driver.quit() if __name__ == '__main__': unittest.main()
| Step | Action | System State | Assertion | Result |
|---|---|---|---|---|
| 1 | Test starts | Test runner initialized, Selenium WebDriver ready | - | PASS |
| 2 | Browser opens Chrome | Chrome browser window opened | - | PASS |
| 3 | Navigates to 'https://web.postman.co/' | Postman web app loading page | - | PASS |
| 4 | Waits for 'New' button to be present using WebDriverWait | 'New' button visible on workspace interface | 'New' button is displayed | PASS |
| 5 | Waits for 'Send' button to be present using WebDriverWait | 'Send' button visible and enabled in request builder | 'Send' button is enabled | PASS |
| 6 | Test ends and browser closes | Browser closed, test complete | - | PASS |