Integration testing FMX app, page_source doesn’t contain app controls

I’m exploring the idea of creating integrations tests for my FMX app. Ideally I’d be able to execute these tests for multiple platforms (Windows, Android, iOS, macOS), but for now I’m just trying to get it to work on Windows (64-bit) first using WinAppDriver.

I’ve created this Python script

from appium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import os

os.startfile('C:\Program Files\Windows Application Driver\WinAppDriver.exe')

desired_caps = {
    'app': "E:\appiumtest\integrationtestdemoproj.exe",
    'platformName': "Windows",
    'deviceName': "WindowsPC"
}

driver = webdriver.Remote("http://127.0.0.1:4723", desired_caps)
wait = WebDriverWait(driver, 30)

print(driver.page_source)

This is the printed driver.page_source

</?xml version=”1.0″ encoding=”utf-16″?><Window AcceleratorKey=”” AccessKey=”” AutomationId=”” ClassName=”TFMAppClass” FrameworkId=”Win32″ HasKeyboardFocus=”False” HelpText=”” IsContentElement=”True” IsControlElement=”True” IsEnabled=”True” IsKeyboardFocusable=”True” IsOffscreen=”True” IsPassword=”False” IsRequiredForForm=”False” ItemStatus=”” ItemType=”” LocalizedControlType=”window” Name=”Form1″ Orientation=”None” ProcessId=”5040″ RuntimeId=”42.330834″ x=”0″ y=”0″ width=”0″ height=”0″ CanMaximize=”False” CanMinimize=”True” IsModal=”False” WindowVisualState=”Normal” WindowInteractionState=”ReadyForUserInteraction” IsTopmost=”False” IsAvailable=”True” //>

I’ve added a couple random characters to the xml output, because I couldn’t get stackoverflow to display it well otherwise.

The problem with this output is that my test application executable contains a TButton and a TEdit, but they don’t seem to show up in the output.

What I also find weird about the output is that FrameworkId is Win32 even though the application is 64-bit.

I looked up if I maybe need to add some accessibility info somehow. Based on this:
https://docwiki.embarcadero.com/RADStudio/Athens/en/FireMonkey_Accessibility_Package it seems like that’s not the case.

I also find it interesting it is able to find the form and the its name, but not the controls.

Relevant version info

  • Windows 11
  • Delphi 12
  • Appium-Python-Client 1.3.0
  • selenium 3.141.0

I also tried a vcl app btw, same result. But if I try the calculator Windows calculator app for example it does work, I can see all the controls in the page_source.

Do fmx and vcl apps just not support what I’m trying to do? Couldn’t find anywhere that it doesn’t.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật