getPageSource is empty on iOS
See original GitHub issueThe problem
Hello,
I have a problem when I want to get page source on Appium with a Real iOS devices ().
It return only the root element (with the bad tagname XCUIElementTypeOther
insteadof XCUIElementTypeApplication
)
Environment
- Appium version (or git revision) that exhibits the issue: 1.10.0
- Last Appium version that did not exhibit the issue (if applicable): /
- Desktop OS/version used to run Appium: Mac OS Mojave
- Node.js version (unless using Appium.app|exe): v8.12.0
- Mobile platform/version under test: iOS 11.2.6
- Real device or emulator/simulator: Real Device
- Appium CLI or Appium.app|exe: with appium
java-client:7.0.0
Details
When I call getPageSource(), I receive that :
<?xml version="1.0" encoding="UTF-8"?>
<AppiumAUT>
<XCUIElementTypeOther type="XCUIElementTypeOther" name="Auchan" label="Auchan" enabled="true" visible="true" x="0" y="0" width="375" height="667" />
</AppiumAUT>
who corresponding to this screen (I have the problem only on this screen):
Perhaps it is an element who is not managing by appium ? It is the first screen I test with a list on iOS
On other screen of my application, I usually receive that :
<?xml version="1.0" encoding="UTF-8"?>
<AppiumAUT>
<XCUIElementTypeApplication type="XCUIElementTypeApplication" name=" " label=" " enabled="true" visible="true" x="0" y="0" width="375" height="667">
<XCUIElementTypeWindow type="XCUIElementTypeWindow" enabled="true" visible="false" x="0" y="0" width="375" height="667">
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="375" height="667">
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="375" height="667" />
</XCUIElementTypeOther>
</XCUIElementTypeWindow>
<XCUIElementTypeWindow type="XCUIElementTypeWindow" enabled="true" visible="false" x="0" y="0" width="375" height="667">
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="375" height="667">
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="375" height="667">
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="375" height="667" />
</XCUIElementTypeOther>
</XCUIElementTypeOther>
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="375" height="667" />
</XCUIElementTypeWindow>
<XCUIElementTypeWindow type="XCUIElementTypeWindow" enabled="true" visible="false" x="0" y="0" width="375" height="667">
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="0" height="0">
.......
</XCUIElementTypeOther>
</XCUIElementTypeWindow>
<XCUIElementTypeWindow type="XCUIElementTypeWindow" enabled="true" visible="false" x="0" y="0" width="375" height="667">
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="375" height="667" />
</XCUIElementTypeWindow>
</XCUIElementTypeApplication>
</AppiumAUT>
Link to Appium logs
Appium log : https://gist.github.com/nicodeur/89a3bb62ca3c0f9ab270eb98b7541703
Code To Reproduce Issue [ Good To Have ]
I execute it from Cerberus
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
iOS: getPageSource() not showing any elements
This occurs randomly, so I can't pinpoint where or why it thinks the app is not loaded. I can see that it fixes...
Read more >I'm trying to get page source code using Selenium, but I got ...
it worked out for Baidu.com and example.com. but when it comes to the URL i actually need,I got empty page.and the source code...
Read more >Appium iOS Testing - 'getPageSource' and 'Requesting ...
My tests get stuck when trying to access UI-Elements at a certain point in my app. 'getPageSource' and 'Requesting snapshot of accessibility ...
Read more >3 Ways to View Page Source on iPhone or iPad
Learn 3 methods to view page source on iPhone or iPad. No need to download additional apps. Works for Safari and Chrome.
Read more >How to get page source/App hirarachy in Appium?
... ios device using appium? How to remove all network connection in appium? Home >> Appium Tricks and Tricks >> How to get...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After more investigation, I tested on an other device (iOs
12.0.1
).getPageSource
works ! But I have a big list who was load (103 elemt). Appium click can click on an element, but it is very slow (between 150 to 300 seconds for a simple click !)After I filtered elements of my list (1 result), I can click quickly.
Any idea ?
Server logs on this issue