#coding=utf-8
from appium import webdriver
import time
desired_caps = {} #列表
desired_caps['platformName'] = 'Android' #安卓的
desired_caps['platformVersion'] = '6.0'  #安卓版本
desired_caps['deviceName'] = 'Android Emulator'  #模拟器Emulator
desired_caps['appPackage'] = 'com.changhong.app'  #测试的包名
desired_caps['appActivity'] = 'com.iwant.ui.SplashActivity'  #启动app的activity
driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps) #本地路径
time.sleep(5) 使用的是SDK自带模拟器6.0 元素定位是UI Automatorview

python_appium_模拟器启动app进行登录的更多相关文章

  1. Appium学习路—脚本篇(启动app)

    启动之前的准备   1.脚本执行前,需要先启动appium的server端, 启动server方法: 打开appium客户端,点击右上角的Launch     2.iOS的测试只能在mac本上做   ...

  2. 给iOS 模拟器“安装”app文件

    前言 刚刚接触iOS的时候,我就一直很好奇,模拟器上面能不能直接安装app呢?如果可以,我们就直接在模拟器上面聊QQ和微信了.直到昨天和朋友们聊到了这个话题,没有想到还真的可以给模拟器“安装”app! ...

  3. appium+Python 启动app(二)

    我们上步操作基本完成,下面介绍编写Python脚本启动app 打开我们pycharm新建.py文件 第一步:输入Python脚本代码: #coding=utf-8 from appium import ...

  4. appium+Python 启动app(一)

    当我们appium和Python环境都配置好了,如何启动我们第一个app呢?下面介绍appium+Python启动app的操作步骤,为了能够详细查看,我们这里使用夜游神模拟器进行示范. 测试项目:QQ ...

  5. Mac下的Chrome或Safari访问跨域设置,MBP上使用模拟器Simulator.app或iphone+Safari调试网页

    Mac下的Chrome或Safari访问跨域设置: mac下终端启动Chrome $ open -a Google\ Chrome --args --disable-web-security 或 /A ...

  6. iOS 模拟器“安装”app

    1.首先在模拟器上运行我们的app程序 2.执行以下命令: ditto -ck --sequesterRsrc --keepParent `ls - -d -t ~/Library/Developer ...

  7. [Robot Framework] 通过RemoteWhiteLibrary启动程序并登录初尝试

    启动remote whitelibrary之后,在robot framework中配置好library,就可以调用whitelibrary的关键字了 启动APP White.LAUNCHAPP    ...

  8. android chrome iframe设置src属性无法启动app

    0x01 Android Intents with Chrome Android有一个很少人知道的特性可以通过web页面发送intent来启动apps.以前通过网页启动app是通过设置iframe的s ...

  9. appium启动APP配置参数:

    一.Android启动app   python启动脚本如下:   from appium import webdriver   desired_caps = {} desired_caps['plat ...

随机推荐

  1. cgi fast-cig php-fpm

    cgi 通用网关接口,接受到动态请求,web服务器会根据这次请求的内容,然后会fork一个新进程来运行, 这个进程会把处理完的数据返回给web服务器,最后web服务器把内容发送给用户,刚才fork的进 ...

  2. GIT教程的好文章

    Git 教學(1):Git的基本使用 Git 教學(2):Git Branch 的操作與基本工作流程 Git 情境劇:告訴你使用 Git 時什麼情況該下什麼指令

  3. [解决]RESTEASY003215: could not find writer for content-type text/html type: java.lang.String

    一.问题描述 1)项目一开始采用JAX-RS 2.1+Jersey 2.26调用REST服务能正常调用并获得正确响应: 2)当项目引入dubbo 2.6.2后也用到rest而dubbo要用到RESTE ...

  4. 李清华201772020113《面向对象程序设计(java)》第十一周学习总结

    实验十一   集合 实验时间 2018-11-8 1.实验目的与要求 (1) 掌握Vetor.Stack.Hashtable三个类的用途及常用API: (2) 了解java集合框架体系组成: (3) ...

  5. python大法好——飞机大战

    import pygame from pygame.locals import * import time def key_control(hero_temp): # 获取事件,比如按键等 for e ...

  6. 序列号多个input输入demo

    <input class="inputs" type="text" maxlength="4" /> <input cla ...

  7. python setup.py 包含静态文件及模板文件

    package_data 和MANIFEST.in都写,include_package_data=True https://stackoverflow.com/a/3597263/8025086

  8. bootstrap之bootstrap-table插件使用心得以及实现过程

    1.首先一个页面(增删改查) 2.实现增删改查(一个框架) 3.编码问题(前端meta utf-8:引用中文包:contentType参数区utf-8的设置:响应的utf-8的编码设置) 4.多条件查 ...

  9. GhostScript应用一例:使用GhostScript强行修改加密PDF

    GhostScript官方网站为:http://www.ghostscript.com/ 作为一个英文开源软件,发现国内用的人很少.尤其是在Windows环境下,Acrobat/Adobe/Foxit ...

  10. 【转】BFG Repo-Cleaner: Removes large or troublesome blobs like git-filter-branch does, but faster.

    https://rtyley.github.io/bfg-repo-cleaner/ an alternative to git-filter-branch The BFG is a simpler, ...