I have testcase running for mobile web, i want to place the script in same place for desktop website script, i’m using mobile web view from chrome(using custom capabilities), the problem is how to make decision for this testcase, like :
if (run using custom capabilities/custom capabilities name){
do this
} else {
do this
}
thank you.
2 Likes
+1
Finally, find a “ugly” solution.
The best solution should be just get the NAME, please let us if anyone find the solution.
I have a custom setting named “iPhone”
import com.kms.katalon.core.configuration.RunConfiguration as RunConfiguration
import com.kms.katalon.core.logging.KeywordLogger as KeywordLogger
properties = RunConfiguration.getDriverPreferencesProperties().toString()
KeywordLogger log = new KeywordLogger()
if (properties.contains(‘iPhone X’)) {
log.logInfo("Success")
}
4 Likes
Thanks, I can use it btw, i think it’s not ugly solution