automation

IRunningObjectTable.Register always sets pdwRegister to 65536, an invalid value

北城余情 提交于 2020-02-24 10:35:49
问题 I'm using IRunningObjectTable.Register and IRunningObjectTable.Revoke as shown in this tutorial. My VBScript client initially calls methods no problem, but when the C# COM server disposes, I always receive a "Value does not fall within the expected range" exception. This is due to the commented line below: private const int ACTIVEOBJECT_STRONG = 0x0; [DllImport("ole32.dll")] private static extern int CreateBindCtx(int reserved, out IBindCtx bindCtx); [DllImport("oleaut32.dll")] private static

import folder of .txt files into word document

我与影子孤独终老i 提交于 2020-02-23 04:09:52
问题 I've found a lot on importing folder of .txt files into excel, but not many on importing .txt files into word. I'm trying to get my macro to open all .txt files in a specific folder and import them into a single word document, with each .txt file having its own page. This is the code I have so far (that I found online): Sub AllFilesInFolder() Dim myFolder As String, myFile As String myFolder = Application.FileDialog(msoFileDialogFolderPicker) With Application.FileDialog

Steps to Install and run headless chrome browser on centos 6.5 using chrome driver

时间秒杀一切 提交于 2020-02-17 13:41:41
问题 I need to install chrome browser on centos 6.5, Here i need to automate some web gui. I have installed chrome driver. Can anyone please provide the steps and download link of chrome-61 and how to install it. My operating system does not have any Gui. Kindly provide the commands. I am using java selenium. Thanks in advance 回答1: Sadly, Google Chrome no longer supports 6.x. You need CentOS 7.x. I used Cent-OS 7.4.* and it worked fine. These are the steps to follow: Download chromedriver : login

Steps to Install and run headless chrome browser on centos 6.5 using chrome driver

我怕爱的太早我们不能终老 提交于 2020-02-17 13:33:42
问题 I need to install chrome browser on centos 6.5, Here i need to automate some web gui. I have installed chrome driver. Can anyone please provide the steps and download link of chrome-61 and how to install it. My operating system does not have any Gui. Kindly provide the commands. I am using java selenium. Thanks in advance 回答1: Sadly, Google Chrome no longer supports 6.x. You need CentOS 7.x. I used Cent-OS 7.4.* and it worked fine. These are the steps to follow: Download chromedriver : login

Steps to Install and run headless chrome browser on centos 6.5 using chrome driver

丶灬走出姿态 提交于 2020-02-17 13:28:17
问题 I need to install chrome browser on centos 6.5, Here i need to automate some web gui. I have installed chrome driver. Can anyone please provide the steps and download link of chrome-61 and how to install it. My operating system does not have any Gui. Kindly provide the commands. I am using java selenium. Thanks in advance 回答1: Sadly, Google Chrome no longer supports 6.x. You need CentOS 7.x. I used Cent-OS 7.4.* and it worked fine. These are the steps to follow: Download chromedriver : login

Selenium switching to new Tab in IE

风流意气都作罢 提交于 2020-02-07 08:38:04
问题 I am using selenium Java. I need to open new tab and open URL in the newly opened tab. I am try to using getWindowHandles, its working fine in google chrome, but the same code is not working for Internet Explorer. Please suggest the proper solution for this. Here is the code I have used. WebDriver=new InternetExplorerDriver(); driver.get("https://google/com"); driver.findElement(By.cssSelector("body")).sendKeys(Keys.CONTROL+"t");// Open new tab driver.switchTo().window(driver.getWindowHandles

Automating Google Maps in C# Web Browser (issue executing javascript properly)

倾然丶 夕夏残阳落幕 提交于 2020-02-07 05:40:05
问题 NOT using API I am currently attempting to use a web browser in C# to load google maps and automatically focus on my current location, however, for some reason I cannot get this to work properly. The idea is simple. Load Google maps, and either execute the script to focus on my current location: mapBrowser.Document.InvokeScript("mylocation.onButtonClick"); Or, invoke the button click through an HtmlElement: HtmlElement myLocationButton = mapBrowser.Document.GetElementById("mylocation");

How to bring browser to front using Selenium WebDriver?

孤人 提交于 2020-02-06 08:13:06
问题 I've a test where it handles login system popup using Robot of Java. But because of some issues, other applications or browser instance come to front and Robot could not perform actions on system popup of Windows. Hence before interacting with system popup using Robot , I want to bring that browser to front on machine. I tried following but it did not help - ((JavascriptExecutor)driver).executeScript("window.focus();"); Could you please suggest how I can bring it to the front? 来源: https:/

How to bring browser to front using Selenium WebDriver?

早过忘川 提交于 2020-02-06 08:12:06
问题 I've a test where it handles login system popup using Robot of Java. But because of some issues, other applications or browser instance come to front and Robot could not perform actions on system popup of Windows. Hence before interacting with system popup using Robot , I want to bring that browser to front on machine. I tried following but it did not help - ((JavascriptExecutor)driver).executeScript("window.focus();"); Could you please suggest how I can bring it to the front? 来源: https:/

After Step and before Step Cucumber

本秂侑毒 提交于 2020-02-05 02:03:09
问题 I want to execute something before and after each step (not scenario). How do I do that in Cucumber ? Like the after and before in junit. ** I am using java. 回答1: There should be something like AfterStep (haven't found BeforeStep yet) AfterStep do #After every step #this is also before the next step... end If you want to filter these for certain steps, do AfterStep('@cucumis', '@sativus') do # This will only run after steps within scenarios tagged # with @cucumis AND @sativus. end Reference: