Ich versuche, eine Dropdown-Liste mit Culbera zu testen. Meine Menüstruktur ist alsCulbera: Auswahl der Dinge aus Dropdown-Liste in einer Android-App
Main Page
-- Program - Setup - Arm
- Torque
-- Test
Jetzt Arm
Displays folgt (sichtbar macht) eine Dropdown-Liste, die die Liste der ARM-Typen zeigt.
Ich möchte einen aus der Dropdown-Liste auswählen und dann Program Arm Type
drücken. Aus irgendeinem Grund funktioniert das nicht wie erwartet.
Wenn benutze ich
python culebra -Gu -o command_trace.txt --scale=01.0
die Spur ich habe ist
vc.findViewWithTextOrRaise(u'Arm').touch()
vc.sleep(_s)
vc.dump(window=-1)
vc.findViewByIdOrRaise("id/no_id/21").setText(u"xxx")
vc.sleep(_s)
vc.dump(window=-1)
vc.findViewWithTextOrRaise(u'OK').touch()
vc.sleep(_s)
vc.dump(window=-1)
vc.findViewWithTextOrRaise(u'Program ArmType').touch()
vc.sleep(_s)
vc.dump(window=-1)
Es tauchte ein Textfeld auf. (Ich habe keine Ahnung, woher es kommt) Kann jemand erklären, wie
in Culbera Dinge aus einer Dropdown-Liste auszuwählenimport re
import sys
import os
import time
from com.dtmilano.android.viewclient import ViewClient
from com.dtmilano.android.adb.adbclient import DOWN_AND_UP
kwargs1 = {'ignoreversioncheck': False, 'verbose': False, 'ignoresecuredevice': False}
device, serialno = ViewClient.connectToDeviceOrExit(**kwargs1)
kwargs2 = {'forceviewserveruse': False, 'useuiautomatorhelper': False, 'ignoreuiautomatorkilled': True, 'autodump': False, 'startviewserver': True, 'compresseddump': True}
_s = 3
_v = '--verbose' in sys.argv
vc = ViewClient(device, serialno, **kwargs2)
# Installs the Android package. Notice that this method returns a boolean, so you can test
# to see if the installation worked.
#vc.installPackage('AbcApp.Android.AbcApp.Android-Signed.apk')
# sets a variable with the package's internal name
package = 'AbcApp.Android.AbcApp.Android'
# sets a variable with the name of an Activity in the packag
activity = 'md591ecfcc0189ae8714.MainActivity'
# sets the name of the component to start
runComponent = package + '/' + activity
# Runs the component
device.startActivity(component=runComponent)
vc.sleep(5)
def GoToView(s):
vc.findViewWithTextOrRaise(unicode(s)).touch()
vc.sleep(_s)
vc.dump(window=-1)
vc.dump(window=-1)
GoToView('Program')
GoToView('Setup')
vc.findViewWithTextOrRaise(u'Arm').touch()
vc.sleep(_s)
vc.dump(window=-1)
vc.findViewWithTextOrRaise(u'OK').touch()
vc.sleep(_s)
vc.dump(window=-1)
vc.findViewWithTextOrRaise(u'Program ArmType').touch()
vc.sleep(_s)
vc.dump(window=-1)
GoToView('Main')
@DiegoTorresMilano - Können Sie sich das bitte ansehen? Danke – liv2hak
Ich habe nicht verstanden, was du meinst "Es tauchte ein Textfeld auf. (Ich habe keine Ahnung, woher es kommt)?" –
Können Sie Screenshots hinzufügen? –