1

I have a test case, where I need to verify:

  1. a user selects any of the options.
  2. the text is not going out of the layout and displays complete readability to the user.

As a result, the UI look and feel user-friendly and does not go off the layout.

Any idea to make this test?

1
  • Welcome to the community. Why are you testing content? You usually do not want to use automation to test content because it changes all the time. Is there a history of this product where text/copy breaks the layout? Have you thought about using a visual test tool like Percy?
    – Lee Jensen
    Dec 20, 2022 at 17:16

3 Answers 3

1

To fix this problem the solution I found is to check the style of the content using methods like (getCssValue and getLocation). So, we can check the style of the element is it stable or not if not we need to make a manual test

0

We need more details for your question.

Let's start from Selenium WebDriver. This framework was developed to create robust, browser-based regression functional automation suites and tests, scale and distribute scripts across most modern web browsers.

So, with WebDriver actually you can automate the next scenario:

  1. Open required browser.
  2. Navigate to required page.
  3. Interact with page (click or select some elements).
  4. Verify that action was performed
  5. Take screenshot of the page.
  6. Save screenshot with test run results.
  7. Manually verify the text/UI looks good (this step can't be automated with WebDriver).

If you need to do automated testing for UI you should remember, that UI testing is centered around two main things:

  1. checking how the application handles user actions carried out using the keyboard, mouse, and other input devices.
  2. checking whether visual elements are displayed and working correctly.

For that purpose you could use special UI automation frameworks (I had experience only with Sikuli UI automation framework). For more details check here.

-1

I have used UI automation frameworks that may get a diff between the screens. But there are no good approaches to check your case with typical automation tools.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.