Start monitoring your landing page today
Change the URL and the sign up button text in the example test above.
Set up fast and reliable end-to-end monitoring for your web apps.
Create your first Playwright scenario:
const { test, expect } = require('@playwright/test');
test('mobile page contains Sign up', async ({ page }) => {
await page.setViewportSize({ width: 360, height: 640 });
await page.goto('https://betterstack.com/');
const pageContent = await page.textContent('body');
expect(pageContent).toContain('Sign up');
});
With this simple test, you can make sure that your customers can sign up from your landing page on mobile. Creating Playwright scenarios for critical user flows is a great way to protect yourself from regressions and unexpected issues.
Change the URL and the sign up button text in the example test above.
We recommend using the Playwright Codegen or ChatGPT:
Playwright Codegen: Record end-to-end tests using VSCode or Playwright Inspector. Read more in the official Playwright guide.
ChatGPT: Generate your tests with the help of AI. Go to ChatGPT and start with this query:
Write a Playwright test using test and expect in JavaScript:
- Set viewport to mobile device size
- Open betterstack.com
- Click Sign up button
- ...
Please let us know at hello@betterstack.com.
We're happy to help! 🙏