automation

Programmatically open context menu using UI automation?

徘徊边缘 提交于 2019-12-21 17:00:02
问题 I'm trying to implement a right click context menu using UI automation. Since UI automation does not have a native right click pattern I am adding an ExpandCollapse provider to the listview's AutomationPeer class and mapping the expand and collapse to opening and closing the context menu. My question, is there a better method of invoking the context menu that doesn't involve trying to instantiate a class with a private constructor? I can't use SendKeys with Shift-F10. I'd like to use the

Visual Studio 2010 automation and environment variables

狂风中的少年 提交于 2019-12-21 13:11:07
问题 I am opening VS2010 solutions using C# and VS2010 automation. I open the solutions like this: Type type = Type.GetTypeFromProgID("VisualStudio.DTE.10.0", true); Object comObject = Activator.CreateInstance(type); ... sol.Open(solution_full_path); The problem I am having is that when I create the instance of the VisualStudio.DTE.10.0 object, it starts the devenv.exe process from winlogon.exe which sees completely different environment than my application. Some of the environment variables are

How would you start automating my job? - Part 2

荒凉一梦 提交于 2019-12-21 12:34:38
问题 (Followup to this question) After surviving the first wave of incoming shipments (9 hours of copy/paste), I now believe I have all the requirements. Here is the updated workflow: Monkey collects email attachments (4 Excel spreadsheets, 1 PDF) Monkey creates central database, does complex calculations (right now this is also an Excel spreadsheet) Monkey sends data to two bosses, who set the retail prices independently; first one to reply wins Monkey sends order form to our other warehouses,

VBS vs PowerShell: Which is lighter?

空扰寡人 提交于 2019-12-21 10:50:48
问题 If I need a script that executes with minimum effort from the system, which would I choose? By looking at processes at Task Manager: Memory (Private Working Set) wscript.exe 2,068K powershell.exe 33,144K Thanks. 回答1: There is a conservation of work principal going on here. If the machine does less work, then you have to do more work. If the machine does more work, you have to do less work. Our philosophy with PowerShell was that the most important resource was the Admin's time and attention

How to get a color of a web element using Selenium WebDriver with python?

跟風遠走 提交于 2019-12-21 09:06:46
问题 How do I locate the background-color of a webelement in hexadecimal format? With my current selenium webdriver python code it is returning the background-color in RGB format. This is the html element that I am looking at div class="bar" style="background-color: #DD514C; background-image: -moz-linear-gradient(center top , #EE5F5B, #C43C35); background-image: -webkit-linear-gradient(top , #EE5F5B, #C43C35); background-image: -ms-linear-gradient(top , #EE5F5B, #C43C35); filter: progid

referencing System.Windows.Automation

雨燕双飞 提交于 2019-12-21 07:04:39
问题 I wanted to try out some of the automation stuff available through BugSlayer, but am having problems with the references. I'm trying to figure out how to reference the System.Windows.Automation library in visual studio. I have the .NET Framework v3.5 installed, and VS 2008, but neither the UIAutomationClient nor System.Windows.Automation appear as a reference option in either the .NET or COM tabs for the references. I can see the dll if I navigate to C:\WINDOWS\assembly\GAC_MSIL

Excel .NET COM - Automation error. The system cannot find the file specified

不想你离开。 提交于 2019-12-21 06:58:47
问题 I have a .NET 2.0 COM object that's used by VBA in Excel. It works fine on my dev machine, but when trying to use it on a clean VM workstation I get this error: Automation error. The system cannot find the file specified. The dll is registered with "regasm /tlb /codebase mycom.dll" and not put in the GAC. I don't have administration rights on the VM box Any ideas? 回答1: You need to either invoke regasm with the full path to the assembly as the codebase parameter value or put the assembly into

Best way to test command line tools? [closed]

只谈情不闲聊 提交于 2019-12-21 06:58:10
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 9 months ago . I have a large collection of command line utilities that are we write ourselves and use frequently. At the moment testing them is very cumbersome and consequently we don't do as much testing as we aught to. I am wondering if anyone can suggest good techniques or tools for

Can a Heroku app add/remove dynos or workers to/from itself?

*爱你&永不变心* 提交于 2019-12-21 06:36:41
问题 Heroku allows you to add and remove dynos and workers on the fly and charges you per second that each is used. Is it possible to set up my app so that it can add/remove dynos and workers from itself depending on the load it's under? This paragraph on Heroku.com mentions an API, but I can't find out much more about it. 回答1: Yes. What you want is something like this: require 'heroku' Heroku::Client.new("username", "password").set_workers("appname", num_workers) 来源: https://stackoverflow.com

example on how to automate google spread sheet using selenium webdriver [closed]

老子叫甜甜 提交于 2019-12-21 05:40:32
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . This one is just a knowledge share example. This is my example for automation for google spread sheet via gmail using selenium webdriver package com.google; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.Alert; import