How to compare two entire pages

hi ppl, i need to compare two diferent versions of a web instance, and need match the entire pages

Perhaps you should use an application that can compare text, like MS Word, Notepad++ or Beyond Compare.


There are probably lots that you can search for.

Right click on the page and select “View Code” or “View Page Source”. Copy and paste it into your application of choice.

My solution is here:

This demo project demonstrate how to automate

  1. visiting multiple URLs,
  2. taking full page screenshot,
  3. scraping HTML source of web pages,
  4. storing those materials into local storage;
  5. then later do comparison of material pairs.

You can compare pages of the Development env and the Production env, or you can compare pages of the Production env before/after a deployment of new software version. These process is entirely automated.

The report gives me a diff of HTML sources scraped out of the web apps in action:

It enables me to compare screenshot images as well:

See a sample test report in action

My solution can run on the Free version of Katalon Studio.

My solution is applicable to Mobile & Web Service (JSON, XML) apps, not only to WebUI.

My solution does not depend on KS. It can run on other tool set on JVM. E.g, WebDriver + GEB + Spock + Groovy + Gradle .

Wow, @kazurayam’s automation solution is incredibly detailed! Saving that GitHub repo for later.

Just to add to this for anyone who needs a quick, ad-hoc way to verify raw source text or page content manually without spinning up a full test script: I usually dump the HTML or text into something like https://comparetext.app/ real quick. It’s great for a fast visual sanity check before committing to automating the whole comparison flow.

Wow @kazurayam great work and explanation. Whenever you post I go through end-to-end, I am sure I will surely get some insight.

Thank you for your interest.

Concerning “page comparison”, I worked on that theme long and published several variations. The following is the latest one, which is dated at Jan 2023.

The following YouTube movie gives you a quick glance over the resulting report.

Possibly my project is applicable to the case of @rodrigo.centurion. I wanted to compare my production web app and a different version in the staging environment at the almost same timing. The 2 web sites have different URL hostnames: for example, https://todo.kazurayam.com and https://staging.todo.kazurayam.com, and the 2 sites have just identical navigation tree.

As far as I see, Katalon’s Visual Testing doesn’t support this scenario. The Katalon’s feature compares the current view of a web app against the baseline view saved days ago. I don’t need this way of view comparison.