You are viewing an old version of this page. View the current version.
Compare with Current
View Version History
Version 1
Next »
1 - An element is not detectable because of a WebView
Websites contain WebViews. With this type of view, the elements inside are not always updated. Consequently, it can be difficult to detect the elements of a web page.
Here is what you can do in this case:
Solutions
Make sure you are using chrome 110 to be in the same conditions as our testbench
To click on an element, first click on a location with no element on the page with the clickByPercent function to refresh the page. For example, if there is no element in the middle of the page, you can use clickByPercent,50,50
. Then, you can try to click on the expected element with the clickByText function. The clickByXY and clickByPercent functions should be avoided because they may not work on another device. However, if the solutions above do not allow you to detect the expected element, theses functions can be used.
To wait for an element, you can use setCompressedLayoutHierarchy,false
just before the wait.
measureStart,CHRGT_contactPage
clickByText,Go to the contact page
setCompressedLayoutHierarchy,false
waitUntilText,Contact page
pause,${PAUSEAFTERLOAD}
measureStop
measureStart,CHRGT_contactPage
clickByText,Go to the contact page
pause,${PAUSEAFTERLOAD}
waitUntilText,Contact page
pause,${PAUSEAFTERLOAD}
measureStop
2 - browserPrepareAndOpenForReference
command does not work
This method is a bit special and is only useful for preparing the phone for measurement. This will not necessarily work on all versions of Chrome and Android.
Case 1 : use Test Runner to set up your GDSL tests and Test Bench
If you are using your own phone to set up your GDSL tests, you can prepare Chrome manually on your phone by closing all tabs and then closing Chrome. Then you can replace the “browserPrepareAndOpenForReference” method with the “launchBrowser” method in your GDSL script. This method will allow you to make a simple chrome opening without preparation.
Be careful though, when you send your tests to the remote devices on Test Bench to obtain measurements, you will need to remember to put this 'browserPrepareAndOpenForReference' method back into your GDSL script.
Case 2 : use Test Runner to do the measurement
If you want to do measurement with your own phone, you will probably need to install a compatible version of Chrome with all GDSL commands : chrome 110.
To change chrome version on your phone on android 10+, you can do
Close your Chrome on your device
Download the mandatory library for chrome 110 trichrome-library
Connect your phone to your PC
Open a terminal on the directory where you download the apk and enter the command (if you have difficulty, please use completion to let your terminal set the correct path to the apk)
adb install com.google.android.trichromelibrary_110.0.5481.65-548106533_minAPI29\(arm64-v8a,armeabi-v7a\)\(nodpi\)_apkmirror.com.apk
Download the .apkm bundle of chrome 110 here : chrome 110
Unzip the .apkm file
Connect your phone to your PC
Open a terminal on the unzip directory
Enter the command
adb install-multiple -r -d *.apk
Open chrome on check it works
You need to prepare your chrome to use GDSL commands
testrunner testdslcommand -c browserReset
3 - How to change chrome version to chrome 110 on local device ?
In this tutorial, we suggest to use apkmirror. Greenspector cannot be held responsible in the event of a security problem. We can only say that apkmirror is a good alternative to playstore with a serious community. Only community member can publish on the store, you just install an apk with the same signature as your chrome (the command ‘adb install’ will detect if the apk was not signed by google).
For android 10+
To change chrome version on your phone on android 10+, you can do
Close your Chrome on your device
Download the mandatory library for chrome 110 trichrome-library
Connect your phone to your PC
Open a terminal on the directory where you download the apk and enter the command (if you have difficulty, please use completion to let your terminal set the correct path to the apk)
adb install com.google.android.trichromelibrary_110.0.5481.65-548106533_minAPI29\(arm64-v8a,armeabi-v7a\)\(nodpi\)_apkmirror.com.apk
Download the .apkm bundle of chrome 110 here : chrome 110
Unzip the .apkm file
Connect your phone to your PC
Open a terminal on the unzip directory
Enter the command
adb install-multiple -r -d *.apk
For android < 10
Close your Chrome on your device
Connect your phone to your PC
Download the .apkm bundle of chrome 110 here : Chrome 110
Unzip the .apkm file
Open a terminal on the unzip directory
adb install-multiple -r -d *.apk
testrunner testdslcommand -c browserReset
For x86 emulator android 10 in linux and windows
adb shell getprop ro.product.cpu.abi
Close your Chrome on your emulator
Download the mandatory library for chrome 110 : trichrome-library
Open a terminal on the directory where you download the apk and enter the command (if you have difficulty, please use completion to let your terminal set the correct path to the apk)
adb install com.google.android.trichromelibrary_110.0.5481.154-548115431_minAPI29\(x86\)\(nodpi\)_apkmirror.com.apk
Download the .apkm bundle of chrome 110 here : Chrome 110
Unzip the .apkm file
Open a terminal on the unzip directory
Enter the command
adb install-multiple -r -d *.apk
Open chrome on check it works
You need to prepare your chrome to use GDSL commands
testrunner testdslcommand -c browserReset
For x86_64 emulator android > 10 in linux and windows
adb shell getprop ro.product.cpu.abi
Close your Chrome on your emulator
Download the mandatory library for chrome 110 : trichrome-library
Open a terminal on the directory where you download the apk and enter the command (if you have difficulty, please use completion to let your terminal set the correct path to the apk)
adb install com.google.android.trichromelibrary_110.0.5481.154-548115437_minAPI29\(x86_64,x86\)\(nodpi\)_apkmirror.com.apk
Download the .apkm bundle of chrome 110 here : Chrome 110
Unzip the .apkm file
Open a terminal on the unzip directory
Enter the command
adb install-multiple -r -d *.apk
Open chrome on check it works
You need to prepare your chrome to use GDSL commands
testrunner testdslcommand -c browserReset