automation

Testing using Plink.exe to connect to SSH in C#

心不动则不痛 提交于 2019-12-17 19:55:19
问题 Im trying to connect to a unix terminal via plink.exe. The goal is so that I can read the text back into a string. My dilema is that the bank I work for uses an old as400 type system that we normally access through putty. I'm trying to develop an automation suite that will interface with the system and run jobs and analyse the outputs etc. So I figured I'd use plink through C#. If I run the code via Command prompt I get (roughly) the text I need back. However im suffering a problem in my C#

Linear models in R with different combinations of variables

杀马特。学长 韩版系。学妹 提交于 2019-12-17 19:46:57
问题 I am new to R and I am stuck with a problem. I am trying to read a set of data in a table and I want to perform linear modeling. Below is how I read my data and my variables names: >data =read.table(datafilename,header=TRUE) >names(data) [1] "price" "model" "size" "year" "color" What I want to do is create several linear models using different combinations of the variables (price being the target ), such as: > attach(data) > model1 = lm(price~model+size) > model2 = lm(price~model+year) >

Is there a headless browser for .NET (for automated Web-UI-Tests)?

痞子三分冷 提交于 2019-12-17 19:36:17
问题 Is there a headless browser for .NET? I am looking for this in a testing context. Coming from Java I am thinking of something similar to HtmlUnit (http://htmlunit.sourceforge.net/) which itself is the base for different higher level tools like Canoo WebTest or Celerity. I would like to create automated UI tests for web applications in a .Net environment, but not using Browser-Remoting (Watin, Selenium...) If possible, I would like to stick to a .Net solution and avoid using Java or Ruby tools

How to use powershell to copy several excel worksheets and make a new one?

空扰寡人 提交于 2019-12-17 19:29:21
问题 I have about 70 excel files I want to combine into a single document. Each document has only one sheet and follows this format: Row A with Columns A-F of headings Row B with the first entry Row C with the second entry Up to 150 rows on some sheets I want to scrape the information from Columns A-F for each row, and combine it into a new file with the information from all of the other files I have in the same directory. Note: I only want to capture Columns A-F since in Column G there exists a

How to skip Autoexec macro when opening MSAccess from MSAccess?

风流意气都作罢 提交于 2019-12-17 19:22:55
问题 So I have an MSAccess MDB that needs to open other MDB's and run a bunch of code that will compare two Access MDB's to find code differences,query diffs,etc. The goal being to verify any production MDB has not been altered from the original deployment. My problem is that many of these Access apps have Autoexec macros and there is no simple way to call .OpenCurrentDatabase without running the autoexec macro. How can I just skip the macro using CODE? I know I can hold down the shift key. I know

Accessing an element with no attributes in Watir

痴心易碎 提交于 2019-12-17 18:59:22
问题 Using Watir, is there a way to access an element without attributes? For example: <span>Text</span> I'd like to avoid using xpath, but if that's the only way it's cool. 回答1: Disregarding the non-WATIR issues of having tags in the first place, or requesting unique attributes from your developers (or yourself), you can always access an element via its parent elements, or by index. For example: Text @browser.div(:name => "content").span(:index => 1) #this is the first span element inside this

Automating remote desktop connection

五迷三道 提交于 2019-12-17 18:43:17
问题 We use many remote desktops in our development environment and there are many servers deployed in multiple environments. It is tedious to remember their IP addresses, usernames, and passwords. I want to write a small utility with buttons on it. When clicked, I want to start those remote desktops, automatically fetching usernames and passwords from some list. I know there is a command line equivalent for MS Remote Desktop: mstsc . This question suggests to do this as follows: cmdkey /generic

Automation add-in vs. COM add-in

喜夏-厌秋 提交于 2019-12-17 17:48:28
问题 I am a newbie with add-in programming and need help with the following scenario: I have an C# Excel automation add-in that calls a few UDF s. I want to do a user name and password check during when the automation add-in loads for which a screen where the user can enter his details must pop up on load of the add-in. How can it be done using an automation add-in? How can event handling be done in general using automation addins ? I want some calculations to be done when the user presses F9 to

How to connect to existing instance of Excel from PowerShell?

风流意气都作罢 提交于 2019-12-17 17:07:02
问题 All examples that automate Excel through PowerShell start with this line: PS> $Excel = New-Object -Com Excel.Application This seems to be handling a new instance of Excel, e.g. running $Excel.Visiable = $true will show an empty, blank Excel window, not switch to the existing workbook. If there is already an instance of Excel running, is there a way to connect to it? 回答1: Instead of the usual New-Object -ComObject excel.application us this $excel = [Runtime.Interopservices.Marshal]:

Exception in thread “main” org.openqa.selenium.NoSuchElementException: Unable to locate element: //*[@id='login-email']

别来无恙 提交于 2019-12-17 17:06:46
问题 I had to re-test the xpath , Previously it was working fine, But now it gives me an error. I tried with different locators as well, Like id , name . but still get the same error. package staging; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class login { public static void main (String[]args){ System.setProperty("webdriver.gecko.driver","C:\\Program Files\\geckodriver.exe"); WebDriver driver = new FirefoxDriver()