Closed Inovvia closed 2 weeks ago
Here are the logs and screenshot.
Hi! Can you attach the source xml file (*.xml)?
Or you can debug to find the cause of the problem. Check following documents.
Watching sourceXML in file https://ldi-github.github.io/shirates-core/in_action/debugging/watching_source_xml_in_file.html
Watching sourceXML in debugger https://ldi-github.github.io/shirates-core/in_action/debugging/watching_source_xml_in_debugger.html
Sure here is the xml
`<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
Thanks.
I found your UI contains text that has trailing space.
text="BDO Unibank, Inc. "
Try this.
it.select("BDO Unibank, Inc. ").tap()
or
it.select("BDO Unibank, Inc.*").tap()
It still errors out. I actually tried that earlier.
Error Log: 180 [00:00:50] 2024/09/19 13:16:51.146 {socialTestFunction-1} 0 - [operate] +2021 C (tap) Tap <BDO Unibank, Inc.*> 181 [00:00:51] 2024/09/19 13:16:51.911 {socialTestFunction-1} 0 - [info] +765 C (tap) Syncing (1) 182 [00:00:51] 2024/09/19 13:16:52.027 {socialTestFunction-1} 0 - [info] +116 C (tap) Synced. (elapsed=0.116) 183 [00:00:51] 2024/09/19 13:16:52.041 {socialTestFunction-1} 0 - [ERROR] +14 C () For input string: "BDO Unibank, Inc."
I tried to reproduce the error with this sample code. But could not.
` val XML = """
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
@Test
fun test1() {
scenario {
case(1) {
TestElementCache.loadXml(XML)
TestElementCache.synced = true
it.select("BDO Unibank, Inc.*")
.tap()
}
}
}
`
I would like to consider workaround.
How about followings?
it.tap("BDO Unibank, Inc.")
it.tap("<BDO Unibank, Inc.>:left")
Not sure what happened but your code worked! Thank you.
Would you be able to explain what "For input string" means?
That was good!
I think "For input string" is Java exception of parsing.
Example
fun test1() {
scenario {
case(1) {
"A".toInt()
}
}
}
java.lang.NumberFormatException: For input string: "A"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
at java.base/java.lang.Integer.parseInt(Integer.java:668)
at java.base/java.lang.Integer.parseInt(Integer.java:786)
...
I guess some error occurred in appium JavaClient because your TestLog_20240919103522.log has no stack trace information.
Check appiumYYYY-MM-DD_HHmmssfff.log if some error occurred at that time.
I think I found the issue now. I had this code after tapping and I was indeed trying to convert to floor the price I get. I guess it was selecting the period in "BDO Unibank, Inc."
val lastPrice = it.select("*.*")
.getProperty("text")
Here is the code snippet:
it.select("BDO Unibank, Inc.").tap()
Here is the error:
Let me know if additional details are needed