I'm trying to implement the basic example shown here on my own code https://applitools.com/tutorials/quickstart/native-mobile/appium/ruby
Here is how my code looks:
# frozen_string_literal: true
require 'eyes_appium'
module Raider
module VisualHelper
attr_reader :eyes
APPIUM = Applitools::Appium
EYES = APPIUM::Eyes
TARGET = APPIUM::Target
REGTANGLE_SIZE = Applitools::RectangleSize
def create_eyes
EYES.new
end
def check_page(page)
page = format_page(page)
@eyes.check(page, TARGET.window)
end
def format_page(page)
page.instance_of?(String) ? page : page.to_s
end
def config(eyes)
eyes.api_key = ENV['APPLITOOLS_API_KEY']
end
end
end
Every time I run I manage to create a successful run on applitools where it reads my viewport with the correct size and know my phone capabilities
However, I keep getting the run empty and this error thrown when I run eyes.check:
Applitools::EyesError:
Request failed: IllegalArgument: size.width must be > 0. Received 0
Does anyone know why this is happening?