automation

DeleteFile with Permission Denied

╄→尐↘猪︶ㄣ 提交于 2021-02-05 07:55:50
问题 I'm running into and issue that has many entries on Stack Overflow, but none of them solved my problem. I have this piece of code, which tries to delete every .txt in a folder, but I keep getting a permission denied error on the "DeleteFile" command: directory = "C:\TEST\FOLDER" Set fso = CreateObject("Scripting.FileSystemObject") Function DeleteTXTs For Each f In fso.GetFolder(directory).Files If LCase(fso.GetExtensionName(f)) = "txt" Then fso.DeleteFile("C:\TEST\FOLDER\*.txt")

How to loop over array values in a karate feature

大兔子大兔子 提交于 2021-02-04 20:59:18
问题 I am trying to loop over array values in a karate feature file. In a Feature1.feature - Scenario1, I have some values in the array ["UUID1","UUID2","UUID3"] and I want to call another feature file (Feature2.feature) (having a code to call a DELETE endpoint) of a service Feature2.feature: @ignore Feature: Delete Background: * url baseUrl * headers {content-type:'application/json'} Scenario: Delete Test Assets Given headers {uid: '#(UId)', cid:'#(CId)'} And path 'type', Type, 'id', AssetId When

How to loop over array values in a karate feature

我们两清 提交于 2021-02-04 20:58:59
问题 I am trying to loop over array values in a karate feature file. In a Feature1.feature - Scenario1, I have some values in the array ["UUID1","UUID2","UUID3"] and I want to call another feature file (Feature2.feature) (having a code to call a DELETE endpoint) of a service Feature2.feature: @ignore Feature: Delete Background: * url baseUrl * headers {content-type:'application/json'} Scenario: Delete Test Assets Given headers {uid: '#(UId)', cid:'#(CId)'} And path 'type', Type, 'id', AssetId When

How to automate challenge-response authentication using Java

余生颓废 提交于 2021-02-04 19:35:26
问题 I have Linux phone with enabled SSH. I need to connect to it via challenge-response authentication. So how looks this process manually, for example, using PuTTY: Connect to phone using IP and port. Console shows "login as:" -> Enter user name. Console shows: login as: craft Challenge: 547-04302 Product ID: 7000315107 Response: I need to copy Challenge, get Response from other server using Challenge and enter the Response in console. How I can do this using Java and some libraries for SSH (I

automating android CTS with python

我只是一个虾纸丫 提交于 2021-02-04 18:37:28
问题 I'm trying to automate the full CTS setup and execution with python & monkeyrunner on Ubuntu and most of it has gone very well. As the very final step, I try executing the following python command to start the CTS on a specific device: cts_tradefed_script = "./android-cts/tools/cts-tradefed" process = subprocess.Popen([cts_tradefed_script, "run", "cts", "-s", '"' + serialno + '"', "--plan", "CTS"], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) which is the equivalent of: .

Open URL that contains umlaut with batch

我的未来我决定 提交于 2021-02-04 08:11:50
问题 I want to open an URL in chrome with a batch file. This works for normal URLs, but it doesn't for URLs with umlauts. start chrome.exe https://trends.google.de/trends/explore?q=mähroboter I cannot use "ae" as a replacement for "ä", as it will give me different results on Google Trends. When I keep it like this, the URL in my browser changes to https://trends.google.de/trends/explore?q=mA4hroboter which again gives me the wrong results. It needs to be "ä". I tried playing around with the file

VBA Automation - Prefilling Combodate Box

早过忘川 提交于 2021-02-02 09:55:30
问题 I am trying to prefill data from Excel to a local intranet website via VBA. I've been able to prefill most data to the site, but I am struggling with this combodate box: Please see HTML code: <div class="form-group row " id="starttime_field"> <label class="col-form-label col-md-3" for="starttime">Start time</label> <div class="col-md-9"> <input type="text" id="starttime" name="starttime" class="form-control" size="30" style="display: none;"><span class="combodate"> <select class="hour " style

Error installing Python 2 packages in Azure Automation

霸气de小男生 提交于 2021-01-29 21:33:09
问题 I'm trying to install Instagram-API-python in Azure Automation to automatize data extraction from this API with a Python script. When I try to install it uploading the .tar.gz file or by the "Import Python 2 packages from pypi" script, azure automation shows me the following message: Orchestrator.Activities.PythonPackageExtractException: Error while extractinig Python package: Error converting tar.gz file to wheel file. Unexpected number of wheel files were created. at Orchestrator.Activities

How to determine xpath for pagination?

我是研究僧i 提交于 2021-01-29 19:01:08
问题 Given below the HTML code of next button (pagination), kindly suggest xpath for pagination <li class = "pagination-link next-link"> <a data-aa-region="srp-pagination" data-aa-name="srp-next-page" <span>next</span> </a> 回答1: Try following xpath . //li[@class='pagination-link next-link']/a[./span[text()='next']] OR //li[@class='pagination-link next-link']/a[@data-aa-name='srp-next-page'] /span[text()='next'] 回答2: wait = WebDriverWait(driver, 10) element =wait.until(EC.element_to_be_clickable(

How to toggle Tcl interact and expect for telnet automation?

纵然是瞬间 提交于 2021-01-29 15:59:48
问题 Similar to but different from autoexpect in that autoexpect will always produce the same output for any given input. Whereas, trying to allow for user input sometimes at least. This works in that it passes control back to the user as below: thufir@dur:~/NetBeansProjects/spawnTelnet/telnet$ thufir@dur:~/NetBeansProjects/spawnTelnet/telnet$ tclsh main.tcl got nyc spawn telnet rainmaker.wunderground.com Trying 35.160.169.47... Connected to rainmaker.wunderground.com. Escape character is '^]'. --