automation

Python urllib2 automatic form filling and retrieval of results

久未见 提交于 2019-12-18 11:56:15
问题 I'm looking to be able to query a site for warranty information on a machine that this script would be running on. It should be able to fill out a form if needed ( like in the case of say HP's service site) and would then be able to retrieve the resulting web page. I already have the bits in place to parse the resulting html that is reported back I'm just having trouble with what needs to be done in order to do a POST of data that needs to be put in the fields and then being able to retrieve

Auto yes to the License Agreement on sudo apt-get -y install oracle-java7-installer

末鹿安然 提交于 2019-12-18 10:01:37
问题 The Oracle Java package for Ubuntu interactively asks about the License Agreement. So I have to say 'OK' and then 'yes' every time, but I'd like to automate it. What I do is this: sudo add-apt-repository -y ppa:webupd8team/java sudo apt-get update sudo apt-get -y install oracle-java7-installer Is there a simple way to automate the agreement process without using expect? 回答1: try this out: sudo add-apt-repository -y ppa:webupd8team/java sudo apt-get update echo debconf shared/accepted-oracle

Automated Unit Testing with JavaScript

我是研究僧i 提交于 2019-12-18 09:55:11
问题 I'm trying to incorporate some JavaScript unit testing into my automated build process. Currently JSUnit works well with JUnit, but it seems to be abandonware and lacks good support for AJAX, debugging, and timeouts. Has anyone had any luck automating (with ANT) a unit testing library such as YUI test, JQuery's QUnit, or jQUnit (http://code.google.com/p/jqunit/)? Note: I use a custom built AJAX library, so the problem with Dojo's DOH is that it requires you to use their own AJAX function

How to automate development environment setup? [closed]

 ̄綄美尐妖づ 提交于 2019-12-18 09:53:33
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . Every time a new developer joins the team or the computer a developer is using changes, the developer needs to do lots of work to setup the local development environment to make the current project work. As a SCRUM team we are trying to automate everything including deployment and

How can I force touch events on none routed Android devices

懵懂的女人 提交于 2019-12-18 09:43:17
问题 I would like to write an application which can programatically generate touch events on the phone. I have already tried this methods: adb : adb swipe and so on... It requires USB cable and connect the phone to pc adb ON TCPIP: same My problem with adb is to require so much presetting by user and I don't want to make the user to learn it. I have already made an application which use adb, but it's difficult for the user to set up properly :( I have heard and I tried to sign my application with

What is `browser.call()` for in Protractor?

只愿长相守 提交于 2019-12-18 09:37:49
问题 I've recently being going through the Protractor API and noticed the browser.call() method: Schedules a command to execute a custom function within the context of webdriver's control flow. I would like to add this function to my toolkit, but I am not sure I completely understand when might it be used in practice and what use cases does it cover? 回答1: the way protractor works is it has an internal queue where it sets the order of your functions. So if you were to call a function somewhere in

Appium, Instruments crashed on startup

对着背影说爱祢 提交于 2019-12-18 09:27:53
问题 When I updated Xcode from 6.4 to 7.2 my Appium UI Automation stopped working, with instruments crashing. Appium: 1.4.13 Xcode: 7.2 Here are the error logs: info: Launching instruments info: [debug] Attempting to run app on iPhone 6 (8.4) info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation

Appium [iOS] Instruments crashed on startup

家住魔仙堡 提交于 2019-12-18 09:14:18
问题 Maybe somebody can help me. When appium tries to run application, the screen flashes with app splash screen, as if appium tries to launch app multiple times. This behaviour happens both on simulator and real device. I set enable on my iOS devices UI Autimation, but when i try start inspector i have this problem: info: [debug] [INST STDERR] 2015-11-05 15:11:05.082 instruments[1495:39489] WebKit Threading Violation - initial use of WebKit from a secondary thread. info: [debug] [INST STDERR]

Close JavaScript Alert Using VBA Automation

北战南征 提交于 2019-12-18 09:12:06
问题 I am searching for a way to close a Javascript pop-up/message box (i.e. not a NEW IE window, but a scripted alert() ) that loads when a webpage is loaded. I currently have code that loads data into a search form, runs the search, retrieves the needed information from the results, exits the search, then continues with the next item in a list. In some cases, there is a piece of critical information missing from the search results. When this happens, the JavaScript on the page pops up the

Automatic download file from web page

倾然丶 夕夏残阳落幕 提交于 2019-12-18 07:19:12
问题 I am looking for a method to download automatically a file from a website. Currently the process is really manual and heavy. I go on a webpage, I enter my pass and login. It opens a pop up, where I have to click a download button to save a .zip file. Do you have any advice on how I could automate this task ? I am on windows 7, and I can use mainly MS dos batch, or python. But I am open to other ideas. 回答1: You can use selenium web driver to automate the downloading. You can use below snippet