How to get the xml code of a specific element in the xml using selenium + appium in ios native app


I’m facing an issue regarding to get the xml code of specific element in native ios app using the selenium + appium.

In the login page we have username and password fields, remember me radio button and Forgot password link. Now we want the xml code of only username and password fields. I was able to get the login page xml code using selenium method “driver.getPageSource();”

Kindly help in resolving this issue.

Thanks in advance

Im quite new but try to search in gooole : how to create a locator appium or selinium , xpath … something like this

You can get page source from ((iosdriver)driver).getpagesource and find username in name attribute.