Learn about best practices for selenium automation, we have the largest and most updated best practices for selenium automation information on alibabacloud.com
ObjectiveSELENIUM+PHANTOMJS can open the browser without interface, implement the silent mode to start the browser to complete the automated test, this mode is excellent, do not need to occupy the computer screen.However, phantomjs this hole is still more, and encountered problems can not see the page, unable to troubleshoot problems.In fact, the Chrome browser can also implement silent mode, do not display the page on the computer, can also implement automated testing.Small Series Environment:P
ObjectiveFile download time will pop up a download option box, this frame is not located, some elements are destined not to be able to locate it does not matter, when there is no mouse, we can use the keyboard shortcut keys to complete the operation.SendKeys Library is a professional handling of keyboard events, so here need to use SendKeys to solveFirst, download the scene1. When you click the Download button, the following page pops up2. If you want to click "Save File" button, solve the probl
These days are really busy smoking, a lot of projects piled together, night and day overtime. Plus some laziness, learning progress has not been much progress. This article mainly introduces the previous period of time to implement a function, I hope there is a need to get a little inspiration.
Based on the UI layer of automation, there are some pits inside that almost everyone will encounter, one of which is registering or signing in with a CAPTCHA.
maintenance of research, and long-term struggle in the domestic well-known internet companies, accumulated a wealth of experience. This book is a brother and a great effort, is also a domestic engineer to write the first ansible books, is full of thousands of goods, it is worth studying carefully.--Xu Yuanzhen, senior information security engineer, Youku Tudou, Inc.This article is from the "Old Wafangdian" blog, please be sure to keep this source http://laowafang.blog.51cto.com/251518/1774958"A
ObjectiveSome small partners learned selenium alert, no matter what pop-up box to use alert, this is not working, see the Popup box, first to determine whether it is alert, is to use, not the words certainly can not be used.
Some pop-up boxes are div layers, which are like normal positioning methods
Some pop-up boxes are nested IFRAME layers, which can be switched by IFRAME
Some pop-up boxes compare pits, which are embedded in a windo
buttonDRIVER.FIND_ELEMENT_BY_ID ("download-btn"). Click () Four, chrome configuration#Coding:utf-8 fromSeleniumImportWebdriverprofile=Webdriver. Chromeoptions () prefs= {'profile.default_content_settings.popups': 0,#set to 0 to suppress pop-up windows 'download.default_directory':'d:\\'}#Specify the download pathProfile.add_experimental_option ('prefs', Prefs)#Executable_path This is the path to chromedriver. If the environment variable is set, this parameter can be omittedChromedriver_
First install the environment you can refer to this article https://www.zhihu.com/question/30496889I use Chrome to browse, download Webdriver's address is http://chromedriver.storage.googleapis.com/index.html,Click to download the historical version of Chrome: https://www.chromedownloads.net/Note that the downloaded version must correspond to its own version of Chrome, or the error will be as follows: version support for Chromedriver can be viewed from http://npm.taobao.org/mirrors/chromedriver/
under the Conf, if you want to configure a Python template can modify Template.python this file, such as I am here to optimize for the following, so that you each time you create a new py file can be displayed.PS: The note in the template is temporarily not supported in Chinese, there will be garbled4, you can also set the font format, this look at the individual needs, very simple, such as:5, for the layout of the window can be in the menu "window" adjustment, this oneself try to understand6,
lookup input source file
DX command generates CLASSES.DEX fileExample command:
dx--dex--outputclasses.dex bin/classes/ libs/Command explanation: Compile the class file under Bin/classes and the jar file under Libs into a Classes.dex file
AAPT generating a resource bundle file Resources.ap_
command example:AAPT Package- M -j R.Java folder> - S Res path> - I. Android.Jar Path> -A Asset Path> - MAndroidmanifest.XMLPath> - F Resources.AP_ file path>
Apkbuilder
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.