automation

Closing an IE instance created by WScript.CreateObject

夙愿已清 提交于 2019-12-24 02:33:19
问题 I'm looking for a way to retrieve the process ID from an object that was created by running: Set ie = WScript.CreateObject("InternetExplorer.Application", "ie_") My problem is that sometimes I see that the iexplorer process remains open and isn't closed after running: ie.stop ie.Quit I found some workarounds, like looking for the newest iexplorer process or looking at the process name, but this isn't good for me since I have several Internet Explorer instances opened in parallel by different

Automate “Save as HAR with Content”

心不动则不痛 提交于 2019-12-24 02:17:31
问题 I am familiar with how to use the Google Chrome Web Inspector to manually save a webpage as a HAR file with the content. I would like to automate this. In my searches for tools to automate the generation of a HAR file, I have found some solutions, but none of them save the content of the resources. I have tried the following without any luck: https://github.com/ariya/phantomjs/blob/master/examples/netsniff.js https://github.com/cyrus-and/chrome-har-capturer Getting the content of the page you

Build Failed : Gradle with uiautomator android

主宰稳场 提交于 2019-12-24 02:10:55
问题 I had been trying to build my test project jar file using gradle instead of ant with uiautomator android but I am getting BUILD FAILED error. I had referred using gradle with uiautomator android form here - http://wiliamsouza.github.io/#/2013/10/30/android-uiautomator-gradle-build-system I had used the following commands : android create uitest-project -n ProjectName -t 46 -p D:\Android_Workspace\Smriti\ProjectName set ANDROID_HOME=D:\Android Development\android-sdk cd D:\Android_Workspace

How to delete VB code from an Excel sheet using C#?

心不动则不痛 提交于 2019-12-24 02:00:58
问题 Does anyone know how to delete all VB code form an Excel workbook using C#? This code doesn’t work. It removes first (last one) VBComponent, but rises ArgumentException on second one. VBProject project = workbook.VBProject; int componentsCount = project.VBComponents.Count; for (int i = componentsCount; i >= 1; i--) { VBComponent component = project.VBComponents.Item(i); project.VBComponents.Remove(component); } Any suggestions? :) 回答1: I solved it with Sam's help. I suspect that each Excel

how to kill firefox gracefully from command line

北城以北 提交于 2019-12-24 01:53:15
问题 I am writing a program that needs to open a list of URLs. I have firefox on Ubuntu12.04, and every time I kill firefox and reopen it, there will be a message asking if I want to restore the previous sessions or not, which is quite annoying. I invoke firefox(in Java) using Runtime r= Runtime.getRuntime(); r.exec("firefox -new-instance www.google.com"); and kill it using r.exec("killall firefox"); Is there a way to kill and reopen firefox more gracefully? I want the program run automatically

How to know App navigating to HomeActivity or LoginActivity - Appium

雨燕双飞 提交于 2019-12-24 01:43:22
问题 I am testing my mobile app using Appium . When app starting it directly navigation to HomeActivity sometimes(if user already logged in). If user not logged in then opening LoginActivity . So, how can I know which activity starting? so that I can execute logout code accordingly. This code not executing at all because app navigation to HomeActivity directly instead of LoginActivity . public void DemoTest() { AndroidElement editElement1 = driver.FindElementById("input_name"); editElement1.Clear(

How to know App navigating to HomeActivity or LoginActivity - Appium

拥有回忆 提交于 2019-12-24 01:43:08
问题 I am testing my mobile app using Appium . When app starting it directly navigation to HomeActivity sometimes(if user already logged in). If user not logged in then opening LoginActivity . So, how can I know which activity starting? so that I can execute logout code accordingly. This code not executing at all because app navigation to HomeActivity directly instead of LoginActivity . public void DemoTest() { AndroidElement editElement1 = driver.FindElementById("input_name"); editElement1.Clear(

Is that good to use driver.manage().window().maximize() in selenium for every time we invoke browser

╄→гoц情女王★ 提交于 2019-12-24 01:24:34
问题 We use driver.manage().window().maximize(); to maximize the browser. I have seen few examples online that are using driver.manage().window().maximize() though it's not required to maximize the browser. (For Ex: gmail login) Also I see on invoking browser using selenium it opens in maximized window only. Still I have to use this driver.manage().window().maximize(); 回答1: Short answer: Yes. Little longer answer: when selenium is interacting with the web page, like clicking on button or writing

How do I embed a custom user-control in MS Word?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 00:57:47
问题 Context: The environment is .Net 3.0 + WPF land, the DB is abstracted well out into the distance and the solution would need to work for Office 2000 and up I guess.. The need is to get a customized report for which the user would like to have certain application windows/boxes (e.g. a trend graph) displayed in Word. The window can be shown as a static image, the user can double-click and edit it (that would bring up an editor.. similar to behavior for an embedded spreadsheet) and OK out to

Using Selenium, xpath cannot find 'text' element

梦想与她 提交于 2019-12-24 00:57:18
问题 I'm new to Selenium and have a problem to find an element by XPath. I was trying to handle this issue but spent too much time on it and it still doesn't work. I'm trying to automate file downloading from this site. I'm searching for the element which contain version name and afterwards I need to click the download icon accordingly. I'm writing the following code in order to find element var element1 = driver.FindElement(By.XPath("//*[@id='versiontable']/div[3]/a[Text()='Firefox 22.0 (Beta 2)'