automation

Upload file to a website via Python script

那年仲夏 提交于 2019-12-24 09:16:27
问题 I want to upload a file from my computer to a file hoster like hotfile.com via a Python script. Because Hotfile is only offering a web-based upload service (no ftp). I need Python first to login with my username and password and after that to upload the file. When the file transfer is over, I need the Download and Delete-link (which is generated right after the Upload has finished). Is this even possible? If so, can anybody tell me how the script looks like or even give my hints how to build

How to register an Office 365 Application in Azure AD automatically using powershell?

自闭症网瘾萝莉.ら 提交于 2019-12-24 09:15:34
问题 For easy deployment, I want to automate app registration process office 365 Azure AD. Manuel process is complex and time consuming to apply certificates and granting certain permissions on calendar or active directory or Graph. I want to simplify the whole registration and deployment process so that process goes smoothly. manual process link click here 回答1: I got the following command to new Microsoft online ServicePrincipal C:\PS>$cer = New-Object System.Security.Cryptography

How to Scrolldwon a web page using htmlunit or PanthomJS

安稳与你 提交于 2019-12-24 08:28:45
问题 I have a web page which continues to loading the contents when ONLY scrolling down the page. So I want a way to scroll down the page pragmatically using HtmlUnit or PanthomJS. Can I imitate the scroll down action(lets think using scroll element). or Can i imitate it using j script. if this can do please explain the way. Thanks. 回答1: You can set InnerHeight a large value. like this: webClient.getCurrentWindow().setInnerHeight(60000); the webcontrol will load all element,because of the

How to Scrolldwon a web page using htmlunit or PanthomJS

坚强是说给别人听的谎言 提交于 2019-12-24 08:28:21
问题 I have a web page which continues to loading the contents when ONLY scrolling down the page. So I want a way to scroll down the page pragmatically using HtmlUnit or PanthomJS. Can I imitate the scroll down action(lets think using scroll element). or Can i imitate it using j script. if this can do please explain the way. Thanks. 回答1: You can set InnerHeight a large value. like this: webClient.getCurrentWindow().setInnerHeight(60000); the webcontrol will load all element,because of the

How can we setup Cypress for IE and Edge?

╄→гoц情女王★ 提交于 2019-12-24 07:26:01
问题 I need to use Cypress for testing angular and react application on Internet Explorer and Microsoft edge. I have gone through some links which mentions that Cypress supports only Chrome, Chromium and Electron. Is it true ? if not the how can i use it for testing IE and Edge.? 回答1: As per the documentation Canary, Chrome, Chromium and Electron are supported. Cypress supported browsers Which means you cannot make a test with IE or present Edge browser. But you can try to make a test with new MS

getopts to use for both flags and option parsing

醉酒当歌 提交于 2019-12-24 07:14:05
问题 I am using getopts in my script and I want to work it for all the following order of option parsing. ./myscript -c server ./myscript -c -h server ./myscript server -c ./myscript -h server -c ./myscript server I am using myscript as follows. #!/bin/bash while getopts c:h: var do case $var in h) host=$OPTARG;; c) FLAG=1 esac done Here "server" is a argument and should load even -h option specifies or not and also -c option I am using for a FLAG.Is there a way to get this achieved. 回答1:

Python - automating MySQL index: passing parameter

♀尐吖头ヾ 提交于 2019-12-24 06:45:07
问题 I have a function with a new improved version of the code for automatic table indexing: def update_tableIndex(self,tableName): getIndexMySQLQuery = """SELECT numberID FROM %s;""" % (tableName,) updateIndexMySQLQuery = """UPDATE %s SET numberID=%s WHERE numberID=%s;""" % (tableName,) updateIndex=1 self.cursorMySQL.execute(getIndexMySQLQuery) for row in self.cursorMySQL: indexID = row[0] self.cursorMySQL.execute(updateIndexMySQLQuery,(updateIndex,indexID)) updateIndex+=1 While the query

How to manage full screen in IE via automation? (Flash player like)

偶尔善良 提交于 2019-12-24 06:43:59
问题 I'm facing a problem with IE7 full screen mode. Got an app lying in an activeX embedded in IE. Until IE6, we managed fullscreen via IWebBrowser2::put_FullScreen(bool bIsFull) which was good and well. But since IE7, it seems that this trick is deprecated, as it looses the tab bar on the way back from fullscreen. One solution would be to go with the call to IWebBrowser2::put_TheaterMode(bool bIsFull) which seems to be what's done in IE7 when stroking F11 But that's not what I want, since there

Automating Outlook and Word to create email message

房东的猫 提交于 2019-12-24 06:37:21
问题 I'm trying to create a Word email message that will be used as the body for an Outlook message. I've been looking at sample code from Microsoft here but this code falls over when trying to create the new word document at the wordApp.Documents.Add line: Word.Application wordApp = new Word.Application(); object template = System.Reflection.Missing.Value; object newTemplate = System.Reflection.Missing.Value; object documentType = Word.WdNewDocumentType.wdNewEmailMessage; object visible = false;

Parallel Test Execution Jenkins

情到浓时终转凉″ 提交于 2019-12-24 06:23:09
问题 I have some automated tests that I'm running using Jenkins. I've Jenkins connected to my GitSwarm which pulls the code from my branch and then exectutes it. I have installed the "Parallel Test Job Execution Plugin" for Jenkins. In the plugin I have specified the tests to run in 3 batches Is there anything else I should specify? I didn't think I would have to since I'm connecting to GitSwarm to run the code. The console output seems to state otherwise ! Building in workspace C:\Jenkins\jobs