In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Step 1: declare:
`static AndroidDriver driver;'
Step 2:
TouchAction ta = new TouchAction (driver); ta.longPress (as). Release (). Perform (); / / long press
Specific code:
Static AndroidDriver driver / * Business card setting link deletion * * step: 1, click my 2, click business card setting logic judgment 1, get all add link content / add application content, 3, if greater than three and not equal to (add link, add application) * 4, delete the fourth If it equals 2, add the link * * @ throws Exception * * / public static void DeleteLinkBusinessCardSet () throws Exception {RandomUtil ru = new RandomUtil () / / this is randomly reserved for modifying business card settings and adding link names Thread.sleep (5000); driver.findElement (GetByLocator.getLocator ("MyInfo")). Click (); Thread.sleep (2000); / / enter the business card setting driver.findElement (GetByLocator.getLocator ("BusinessCardSet")). Click (); / / set Thread.sleep (2000) List LinkNameCard = driver.findElements (GetByLocator.getLocator ("LinkNameCard")); int ncount = LinkNameCard.size (); if (ncount > 2) {for (AndroidElement as: LinkNameCard) {String nLinkNameCardlist = as.getAttribute ("text"); System.out.println ("LinkNameCard:" + nLinkNameCardlist) If (! nLinkNameCardlist.equals) & &! nLinkNameCardlist.equals ("add Link") {TouchAction ta = new TouchAction (driver); ta.longPress (as). Release (). Perform (); / / long press driver.findElement (GetByLocator.getLocator ("PromptDetermine"). Click () Driver.pressKeyCode (AndroidKeyCode.BACK);} break;}} else {Thread.sleep (2000); driver.pressKeyCode (AndroidKeyCode.BACK); / / return to my page TJTAppiumTest.AddingLinkCardSetHyperlink (); TJTAppiumTest.BusinessCardSetAddLinks ();}}
With this setting, you can achieve a long press and pop up, whether or not the button
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.