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

Hi,

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

Example:
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.