I have to test a native app using appium ios. In one of my test case my scenario is to get the Text font type or font size.
I use
.getCssValue("font-size")
but this does not work as the app does not have web view. Now i am trying to get this by using
UI Automation JavaScript Reference for iOS
i use the below code to get it:
String name = (String) driver.executeScript("UIATarget.localTarget().frontMostApp().mainWindow().navigationBar().staticTexts()[0].fontName()");
but this does not work. I have stucked in this problem. Please help.
Its not possible to get font size of the element at the moment, just because it does not supported by XCUIElementAttributes, so Appium that uses XCUITest as iOS framework has no possibility as well
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With