滑动并单击按钮量角器

编程入门 行业动态 更新时间:2024-10-28 22:29:50
本文介绍了滑动并单击按钮量角器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要刷一个项目,需要点击该项目中的按钮,我用这个测试成功但我无法查看该按钮这个测试用例被写入左侧滑动并按下按钮可见并点击该按钮

i need to swipe an item and need to click on a button in that item, i used this the test is success but i could not view that button this test case is written to swipe left and make a button visible and click on that button

it('should delete a product',function(){ browser.driver.actions().mouseMove({x:-50,y:0}).perform(); browser.sleep(3000); });

有人可以帮助我刷删除按钮

could someone help me to swipe the delete button is

<ion-option-button ng-show="!userService.isOffline" class="button button-assertive button disable-user-behavior" on-tap="deleteLead(leads)">Delete</ion-option-button>

推荐答案

我正在做一些与离子列表类似的事情,带有离子项和离子选项按钮。我的滑动工作,看起来像这样:

I am doing something similar, with an ion-list, with ion-items, and ion-option-buttons. My swipe works, and looks like this:

var elements = element(by.id("item-list")).all(by.tagName("ion-item")); var item1 = elements.get(0); item1.getLocation().then((location) => { var startLocation = { x: location.x + 300, y: location.y + 50 } var newLocation = { x: startLocation.x - 100, y: startLocation.y }; browser.driver.touchActions() .tapAndHold(startLocation) .move(newLocation) .perform(); }

所以我认为你应该使用touchActions()而不是action()

So I think you should use touchActions() instead of actions()

顺便说一句,是否有工作?为什么不使用? ng-click?

By the way, does on-tap work? Why not using ng-click?

更多推荐

滑动并单击按钮量角器

本文发布于:2023-11-22 23:07:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1619277.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:量角器   单击   按钮

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!