0
ドラッグメソッドのorientationパラメータは何をしますか?AndroidViewClientのdevice.dragメソッドのパラメータは何ですか?
ドラッグメソッドのorientationパラメータは何をしますか?AndroidViewClientのdevice.dragメソッドのパラメータは何ですか?
ソースを見てみましょう:私は期間および/または手順を変更した場合 はまた、それが大きな違い
vc.device.drag(開始、終了、期間、手順、オリエンテーション)ことはなりません。コード(オープンソースの最大):また
def drag(self, (x0, y0), (x1, y1), duration, steps=1, orientation=-1):
'''
Sends drag event in PX (actually it's using C{input swipe} command).
@param (x0, y0): starting point in PX
@param (x1, y1): ending point in PX
@param duration: duration of the event in ms
@param steps: number of steps (currently ignored by @{input swipe})
@param orientation: the orientation (-1: undefined)
'''
self.__checkTransport()
if orientation == -1:
orientation = self.display['orientation']
(x0, y0) = self.__transformPointByOrientation((x0, y0), orientation, self.display['orientation'])
(x1, y1) = self.__transformPointByOrientation((x1, y1), orientation, self.display['orientation'])
version = self.getSdkVersion()
if version <= 15:
raise RuntimeError('drag: API <= 15 not supported (version=%d)' % version)
elif version <= 17:
self.shell('input swipe %d %d %d %d' % (x0, y0, x1, y1))
else:
self.shell('input touchscreen swipe %d %d %d %d %d' % (x0, y0, x1, y1, duration))
は、心に留めておくAndroidViewClientの主な目的の一つとculebraは、広範囲の条件の下で実行できるテストを生成することであるということだけではなく、1つの存在それらが生成されたとき。異なるデバイス、画面、または解像度で同じテストを実行できます。また、別のオリエンテーションの下で同じテストを実行することができます。テストが生成されるときには、オリエンテーションが保存されます。装置を回転させた。
期間使用方法は、ソースで確認できるように、アンドロイドのバージョンによって異なります。
ステップは、現在無視されています。