网站怎么做查询系统做网站推广的一般都是什么公司
- 作者: 五速梦信息网
- 时间: 2026年03月21日 07:21
当前位置: 首页 > news >正文
网站怎么做查询系统,做网站推广的一般都是什么公司,刚刚发布了天津的最新消息,免费网络推广100种方法0.使用inspector时#xff0c;一定要把不相关的如weditor啥的退出去#xff0c;否则#xff0c;净是事。 1.从0开始的数据获取 第一个位置#xff0c;有时0.0.0.0#xff0c;不可以的话#xff0c;你就用这个。 第二个位置#xff0c;抄上。 直接点击第三个启动。不要…0.使用inspector时一定要把不相关的如weditor啥的退出去否则净是事。 1.从0开始的数据获取 第一个位置有时0.0.0.0不可以的话你就用这个。 第二个位置抄上。 直接点击第三个启动。不要问为什么问就是。我也不知道。 第一个错误它说得有个平台名好吧。 错误 Failed to create session. An unknown server-side error occurred while processing the command. Original error: You must include a platformName capability 添上 注意一定要添上如下 appium:automationName: UiAutomator2 再次启动。OK了进来了。 再次提醒版本不一样出错不一样你根据出错的地方完善就可以。 2.获取某团相关 自动点击手机上的某团打开它。 一个一个的点复制。 getCurrentActivity com.meituan.android.pt.homepage.activity.MainActivity getCurrentPackage com.sankuai.meituan 返回修改 {appium:platformName: Android,appium:automationName: UiAutomator2,appium:appPackage: com.sankuai.meituan,appium:appActivity: com.meituan.android.pt.homepage.activity.MainActivity } 其他信息模仿吧。 通过adb获取信息 C:\Users\Administratoradb shell dumpsys activity | findstr mResumemResumedActivity: ActivityRecord{1fef505 u0 com.sankuai.meituan/com.meituan.android.pt.homepage.activity.MainActivity t1097}形成测试代码 from appium import webdriver from appium.options.android import UiAutomator2Options desired_caps {platformName: Android,platformVersion: 10,deviceName: Q5X7N19605002672,appium:appPackage: com.sankuai.meituan,appium:appActivity: com.meituan.android.pt.homepage.activity.MainActivity,unicodeKeyboard: True,resetKeyboard:True,noReset:True,appium:newCommandTimeout: 6000,appium:automationName: UiAutomator2 }if desired_caps is not None:driver webdriver.Remote(http://127.0.0.1:4723/wd/hub, optionsUiAutomator2Options().load_capabilities(desired_caps)) else:raise ValueError(desired_caps must not be None) 运行成功。 用inspector进行附加。 利用代码启动某团一定要利用pycharm中的代码进行否则无效原理很简单。就是通过appium互动留下的信息进行启动的。 再次刷新附加 界面示例 3.点击某个元素、输入文本、搜索等。 点击超市便利为例 有一个结果点击一下。看手机是否正常反映 有反映记录之 (//android.widget.ImageView[resource-idcom.sankuai.meituan:id/channel_icon])[5] 输入商店名称进行搜索以下记得刷新否则你明白 的。信息不准。 方法同上。 输入框定位后点击一下。 //android.widget.LinearLayout[resource-idcom.sankuai.meituan:id/minutes_animte_action_search]/android.widget.LinearLayout[1] 进入新窗口 通过应用源一级级定位到最低级的编辑框位置。输入想要搜索的关键词。 //android.widget.EditText[resource-idcom.sankuai.meituan:id/txt_search_keyword] 如下图 定位搜索按钮。 //android.widget.LinearLayout[resource-idcom.sankuai.meituan:id/search_tv] 来到以下页面。 点击排名第一个商店进入商店 通过应用源一级级的定位不再多说。 (//android.widget.FrameLayout[resource-idcom.sankuai.meituan:id/mach_container_wrapper])[2] 来到如图 4.根据以上查证结果生成py文件进行自动操作。 提醒以上其实是XPATH定位不是最推荐的但目前用这个就行。 以下代码完整无伤通过。 from appium import webdriver from appium.options.android import UiAutomator2Options desired_caps {platformName: Android,platformVersion: 10,deviceName: Q5X7N19605002672,appium:appPackage: com.sankuai.meituan,appium:appActivity: com.meituan.android.pt.homepage.activity.MainActivity,unicodeKeyboard: True,resetKeyboard:True,noReset:True,appium:newCommandTimeout: 6000,appium:automationName: UiAutomator2 }driver webdriver.Remote(http://127.0.0.1:4723/wd/hub, optionsUiAutomator2Options().load_capabilities(desired_caps))# 设置超时时间和重试间隔 timeout 10 poll_frequency 1 from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC####################### 点击超市便利########################################################element WebDriverWait(driver, timeout, poll_frequency).until(EC.element_to_be_clickable((By.XPATH, (//android.widget.ImageView[resource-idcom.sankuai.meituan:id/channel_icon])[5])) ) element.click() ######################### 点击搜索框######################################################## element WebDriverWait(driver, timeout, poll_frequency).until(EC.element_to_be_clickable((By.XPATH, //android.widget.LinearLayout[resource-idcom.sankuai.meituan:id/minutes_animte_action_search]/android.widget.LinearLayout[1])) ) element.click() ##################### 使用显式等待定位并输入文本############################################################ try:search_box WebDriverWait(driver, timeout, poll_frequency).until(EC.presence_of_element_located((By.XPATH, //android.widget.EditText[resource-idcom.sankuai.meituan:id/txt_search_keyword])))search_box.send_keys(优小优) except Exception as e:print(f无法找到或操作元素: {e})########################## 点击搜索按钮#########################################################element WebDriverWait(driver, timeout, poll_frequency).until(EC.element_to_be_clickable((By.XPATH, //android.widget.LinearLayout[resource-idcom.sankuai.meituan:id/search_tv])) ) element.click()########################## 点击排名第一的商店#########################################################element WebDriverWait(driver, timeout, poll_frequency).until(EC.element_to_be_clickable((By.XPATH, (//android.widget.FrameLayout[resource-idcom.sankuai.meituan:id/mach_container_wrapper])[2])) ) element.click() 希望你也能一次无伤通过。 下一节打算获取其商品数据。并保存之。
- 上一篇: 网站怎么做才有效果wordpress u盘
- 下一篇: 网站怎么做成app华为云定制建站服务怎么样
相关文章
-
网站怎么做才有效果wordpress u盘
网站怎么做才有效果wordpress u盘
- 技术栈
- 2026年03月21日
-
网站怎么做才有百度权重网站搭建崩溃
网站怎么做才有百度权重网站搭建崩溃
- 技术栈
- 2026年03月21日
-
网站怎么做才 吸引人杭州知名设计公司排名
网站怎么做才 吸引人杭州知名设计公司排名
- 技术栈
- 2026年03月21日
-
网站怎么做成app华为云定制建站服务怎么样
网站怎么做成app华为云定制建站服务怎么样
- 技术栈
- 2026年03月21日
-
网站怎么做的qq邮件订阅招聘网页制作工程师
网站怎么做的qq邮件订阅招聘网页制作工程师
- 技术栈
- 2026年03月21日
-
网站怎么做的有创意网站建设什么是开发实施实施
网站怎么做的有创意网站建设什么是开发实施实施
- 技术栈
- 2026年03月21日
