automation

Uninstall Device from powershell

纵饮孤独 提交于 2021-02-20 05:12:33
问题 I run automation that installs a preset OS /w Drivers and configuration. I inherited the automation second hand and there's a lot to it. I have a system with hybrid graphics and it hands on verifying the display drivers. Now, I can walk over to the machine, open device manager, right click on one of the graphics devices, click uninstall (i do not delete the driver files) and then the automation continues. Once its done, the system restarts and both device drivers are back. I am wondering if

Uninstall Device from powershell

旧巷老猫 提交于 2021-02-20 05:09:47
问题 I run automation that installs a preset OS /w Drivers and configuration. I inherited the automation second hand and there's a lot to it. I have a system with hybrid graphics and it hands on verifying the display drivers. Now, I can walk over to the machine, open device manager, right click on one of the graphics devices, click uninstall (i do not delete the driver files) and then the automation continues. Once its done, the system restarts and both device drivers are back. I am wondering if

Excel VBA control IE

ⅰ亾dé卋堺 提交于 2021-02-19 07:54:05
问题 I have found the following code on the WiseOwl website. I am trying to find a working example (to learn from) on how to enter a seach string into Googles search field. I keep getting a debug error 462 andf cant get past this. The line causing the problem is: ieApp.Document.getElementById("gbqfqw").Value = "Excel VBA" My total code is: Sub FillInBBCSearchForm() Dim ieApp As New SHDocVw.InternetExplorer ieApp.Visible = True 'go to the website of interest ieApp.Navigate "http://www.google.co.uk"

bash script to run jupyter notebook in virtualenv

人走茶凉 提交于 2021-02-19 04:19:20
问题 To speed up launching projects I created a small bash script which does the following: takes an argument (project name) moves to the directory of that project starts a virtual environment starts a jupyter notebook #!/bin/bash if [ "$1" == "k3" ]; then project_path="tau-code/k3-analysis/" fi codepath="/media/peter/somedrive/code" full_path="$codepath/$project_path" # Go to directory of project cd $full_path # Start environment & notebook if available pipenv shell jupyter notebook --ip=0.0.0.0

bash script to run jupyter notebook in virtualenv

一世执手 提交于 2021-02-19 04:18:25
问题 To speed up launching projects I created a small bash script which does the following: takes an argument (project name) moves to the directory of that project starts a virtual environment starts a jupyter notebook #!/bin/bash if [ "$1" == "k3" ]; then project_path="tau-code/k3-analysis/" fi codepath="/media/peter/somedrive/code" full_path="$codepath/$project_path" # Go to directory of project cd $full_path # Start environment & notebook if available pipenv shell jupyter notebook --ip=0.0.0.0

Remove empty line from a multi-line string with Java

旧时模样 提交于 2021-02-19 01:28:45
问题 I have a multi-line string and some empty lines between other lines. It looks like: def msg = """ AAAAAA BBBBBB CCCCCC DDDDDD EEEEEE TEST FFFFF GGGGGG """ I tried some regex expression with : msg = msg.replaceAll('(\n\\\\s+\n)+', '') Or msg = msg.replaceAll('(\r?\n){2,}', '$1'); But nothing is good about what I'm looking... Is it possible to remove only empty lines? to get something like that : def msg = """ AAAAAA BBBBBB CCCCCC DDDDDD EEEEEE TEST FFFFF GGGGGG """ 回答1: Use regex (?m)^[ \t]*\r

Remove empty line from a multi-line string with Java

元气小坏坏 提交于 2021-02-19 01:27:10
问题 I have a multi-line string and some empty lines between other lines. It looks like: def msg = """ AAAAAA BBBBBB CCCCCC DDDDDD EEEEEE TEST FFFFF GGGGGG """ I tried some regex expression with : msg = msg.replaceAll('(\n\\\\s+\n)+', '') Or msg = msg.replaceAll('(\r?\n){2,}', '$1'); But nothing is good about what I'm looking... Is it possible to remove only empty lines? to get something like that : def msg = """ AAAAAA BBBBBB CCCCCC DDDDDD EEEEEE TEST FFFFF GGGGGG """ 回答1: Use regex (?m)^[ \t]*\r

python, COM and multithreading issue

拈花ヽ惹草 提交于 2021-02-19 01:01:07
问题 I'm trying to take a look at IE's DOM from a separate thread that dispatched IE, and for some properties I'm getting a "no such interface supported" error. I managed to reduce the problem to this script: import threading, time import pythoncom from win32com.client import Dispatch, gencache gencache.EnsureModule('{3050F1C5-98B5-11CF-BB82-00AA00BDCE0B}', 0, 4, 0) # MSHTML def main(): pythoncom.CoInitializeEx(0) ie = Dispatch('InternetExplorer.Application') ie.Visible = True ie.Navigate('http:/

detecting a file downloaded in selenium java

南笙酒味 提交于 2021-02-18 12:09:23
问题 I wrote an automation test in selenium java that detects if the page is redirecting (the automation detects if a new page is opened, the page redirects to other page, a new tab is opened and if an alert window is opened) Now to the problem. one of the redirects i can't find any way to detect is an automatic downloaded file (you enter a website and the website automatically downloads a file without any trigger from the user) p.s. I know the download process may differ in each browser, I need

detecting a file downloaded in selenium java

寵の児 提交于 2021-02-18 12:07:43
问题 I wrote an automation test in selenium java that detects if the page is redirecting (the automation detects if a new page is opened, the page redirects to other page, a new tab is opened and if an alert window is opened) Now to the problem. one of the redirects i can't find any way to detect is an automatic downloaded file (you enter a website and the website automatically downloads a file without any trigger from the user) p.s. I know the download process may differ in each browser, I need