automation

Is it possible to automatically set “Copy to Output Directory” when creating files in Visual Studio 2010?

别来无恙 提交于 2019-12-19 00:45:14
问题 I recently started playing around with LuaInterface to get Lua scripting working in my C# programs. In order to easily create Lua scripts from within Visual Studio, I installed a Lua syntax highlighting plugin and created an Item Template so that I could create new scripts by right clicking on the project file and selecting "New Item->Lua Script". This works quite well. In order for the program to find the scripts, they need to be placed in the same directory (or a subdirectory) of the build

Java robot.mouseMove(x, y) not producing correct results

谁说我不能喝 提交于 2019-12-18 23:49:40
问题 I have recently been trying to automate a program I made and I have run into a problem, robot.mouseMove(100, 100) doesn't send the mouse to 100, 100. I made this simple program to show this off: new Robot().mouseMove(100, 100); System.out.println(MouseInfo.getPointerInfo().getLocation().getX() + " , " + MouseInfo.getPointerInfo().getLocation().getY()); This code produces different results every time I run it: 54.0 , 54.0 0.0 , 0.0 58.0 , 58.0 When you put this in a loop the mouse approaches

How to type in textbox using Selenium WebDriver (Selenium 2) with Java?

本秂侑毒 提交于 2019-12-18 19:28:07
问题 I am using Selenium 2 . But after running following code, i could not able to type in textbox. package Actor; import org.openqa.*; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.junit.*; import com.thoughtworks.selenium.*; //import org.junit.Before; public class Actor { public Selenium selenium; public WebDriver driver; @Before public void setup() throws Exception{ driver

Word Automation: Replace an Image using C#

穿精又带淫゛_ 提交于 2019-12-18 16:53:56
问题 I'm trying to change text and images in a word document using c# and word automation. I've got it working fine for text where I do something like the snippet below, but I don't even know how to start for replacing the image. Any help is greatly appreciated! Oliver using Microsoft.Office.Interop.Word; ... private static Application WordApp; private static object missing = System.Reflection.Missing.Value; private static object yes = true; private static object no = false; ... object search;

How do I create and send appointments to Microsoft Outlook calender?

半城伤御伤魂 提交于 2019-12-18 16:41:39
问题 I am trying to create an appointment in the Microsoft Outlook (2003) calender of another person using the below code.While running this program, The Appointment is getting saved in my calender.But not being sent to the recipient. try { Microsoft.Office.Interop.Outlook.Application app = null; Microsoft.Office.Interop.Outlook.AppointmentItem appt = null; app = new Microsoft.Office.Interop.Outlook.Application(); appt = (Microsoft.Office.Interop.Outlook.AppointmentItem)app .CreateItem(Microsoft

How to access the values of Chrome's Dev tools Network tab's Request or summary using Selenium in python/java?

拜拜、爱过 提交于 2019-12-18 13:39:26
问题 I'm using chrome option to access the performance logging using selenium, I'm trying to write a code that would help me figure out the total number of the http request and the size of the page after the loading is finished. Manually we can check this by using Dev tool's network tab. Just need to know how to access the Network table's value or summary values. Because the performance logging is not giving me the summarized values that I need, I would like to write a code to get: The total

How to automate script generation using SMO in SQL Server?

丶灬走出姿态 提交于 2019-12-18 13:37:21
问题 I would like to automate script generation (in SSMS --> Tasks --> Generate Scripts) in SSMS 2008. I have read that SQL Server 2008 does not support Database Publishing Wizard (including SQLPUBWIZ SCRIPT) but this automation can be done using SMO in SQL Server 2008. I don't have a clue about SMO and how to do this using SMO, so could you give me some advice (resources etc.) how to begin? 回答1: The key to SMO scripting is the Scripter class. All other tools (like SSMS) use this class to

call RMarkdown on command line using a.R that is passed a file

这一生的挚爱 提交于 2019-12-18 12:56:20
问题 In summary, I am using my script 'Graphs.R' on 'input_file1.txt' in RStudio to create a Rmd which I then knit to html. I would like to automate this process to run more files on the command line. So far, I can get the Rscript to run on the command line using: Rscript Graphs.R input_file1.txt I also know that I can create an .RMD file using: Rscript -e rmarkdown::render(Graphs.R) However, I would like to do the following: Rscript -e rmarkdown::render('Graphs.R input_file1.txt', 'output_file

How to determine the session id on remote machine for usage with psexec -i using script/powershell/…?

試著忘記壹切 提交于 2019-12-18 12:35:31
问题 I am in need of a script or powershell command that will be able to determine the session id of a specific logged in user on remote machine, to be later used as parameter to the psexec -i execution of remote gui process on that session of that user on the remote machine. So far i managed to use psexec \\remoteMachine -u user -p pswrd query session to get list of sessions on the remote machine: SESSIONNAME USERNAME ID STATE TYPE DEVICE console 0 Conn wdcon rdp-tcp#919 user 1 Active rdpwd rdp

WatiN in Visual Studio 2008 - second test method fails

我们两清 提交于 2019-12-18 11:58:19
问题 When trying to run a very simple WatiN 2.0 (CTP3) test in Visual Studio 2008 I found that the first one always executes fine. The second test method seem to break something in the IE object producing the following exception: Test method testProject.WatinTest.testTwo threw exception: System.Runtime.InteropServices.InvalidComObjectException: COM object that has been separated from its underlying RCW cannot be used.. A sample code is below. Due to the way the initialization method is workin in