0

I have a MIPS based device, which runs Blink based browser. (With Webdriver/Selenium).

I wanted to automate few test cases and hence used Selenium. Instead of Visual comparison of few things, wanted to compare the images using Python PIL.

  • First to got the "preferred output", by running it on PC-chrome and got the Screen shot of the element See the Link.

  • Similarly run the test on device.

  • Compare the two image using - See the Link

But it gives me error: "TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'"

When I checked the images, the images saved are in two different "Bit-depth". the Image stored from PC was 24bits and from device was 32bit.

How can I configure webdriver to capture image in different bit depths?

Community
  • 1
  • 1
hari
  • 1,419
  • 4
  • 19
  • 30

1 Answers1

0

The main difference is "Alpha" channel. Instead of setting webdriver, I have modified my test itself, to always convert the image to "RGB" format (Link) and then compare. In this way, I am able to overcome the issue. In case some body has an idea on disabling "Alpha" channel in WebDriver itself, it would be better.

hari
  • 1,419
  • 4
  • 19
  • 30