TypeError source.indexof is not a function
See original GitHub issueHi I was using appium 1.6.0 , then today I’ve updated my appium to 1.6.3(using the same source code on our side ). But now after application is opened. I saw these error lines writes infinitely after executing this line of code.
String xmlStr = driver.getPageSource();
@#[line:0,col:undefined]
[xmldom error] element parse error: TypeError: source.indexOf is not a function
Does anyone know any solution to that?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:32 (15 by maintainers)
Top Results From Across the Web
Uncaught TypeError: .indexOf is not a function - Stack Overflow
2. It is indeed a function - of a valid object - meaning time isn't a valid object. Make sure time exists, log...
Read more >TypeError: indexOf is not a function in JavaScript | bobbyhadz
The "indexOf is not a function" error occurs when the indexOf() method is called on a value that is not of type string...
Read more >TypeScript: how to resolve error 'indexOf is not a function'
Sometime on TypeScript, when you call the indexOf() method you can get the error 'indexOf is not a function'. This happens when the...
Read more >[xmldom error] element parse error: TypeError: source.indexOf ...
The problem I am getting this issue when i tried to run my scripts in a real device, but am able to run...
Read more >Solved: .indexOf is not a function - Adobe Support Community
In your case, indexOf is a method of a String object while myAlphas is an array. An array object doesn't have a indexOf...
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
Hi,
I’ve come across the same issue re-installing Appium 1.6.4-beta. Or even upgrading to 1.6.4-beta.2
I saw Appium was sending to the device
Proxying [POST /wda/element/0/dragfromtoforduration] to [POST http://localhost:8100/session/02B4BCD9-BC91-4B62-864F-CDF015C73524/wda/element/0/dragfromtoforduration] with body: {"fromX":"200","fromY":"600","toX":"200200","toY":"600100","duration":0.002}
when Robot Framework keyword wasSwipe 200 600 200 100 2
. It seems the last coordinates were concatenated with the origin ones. That’s another issue, but it was what made me re-install 1.6.4-beta.So, after re-installing, and when the app finished launching (which was working just fine before) started to show these:
Here are the Appium logs log_appium_sourceIndexOfIsNotAFunction.log.zip
And the device logs log_device_source.indexOfIsNotAFunction.log.zip
Hope it helps.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.