automation

How to add application to Azure AD programmatically without having any initial clientId registered?

偶尔善良 提交于 2019-12-25 08:24:51
问题 I want to automate application creation in Azure AD (Without using management portal). I also want to establish this using only Graph api (without using PowerShell). I have seen thread where this question is discussed (How to add application to Azure AD programmatically?), but it doesn't exactly do what I need. Since I need to already have clientId in order to get auth token and call any graph apis, I can't really automate the process of initial app creation. (I am having chicken and egg

Position/scale image after programmatically pasting it into bookmark range

心不动则不痛 提交于 2019-12-25 08:14:31
问题 I'm creating a Word 2010 document using C# and Microsoft.Office.Interop.Word . Using the Range.Paste method, I insert a bitmap (from RAM) at a specified bookmark: Word.Bookmark bookmark = document.Bookmarks.get_Item(ref oBookmark); Clipboard.SetDataObject(image); bookmark.Range.Paste(); This bookmark is placed inside a frame (created with the "Insert Frame" command), hence the pasted image is placed inside the frame. Now, the image is automatically scaled to fit the frame horizontally. This

TypeInitializationException when doing action with an element in c#, Selenium

一笑奈何 提交于 2019-12-25 07:39:11
问题 I just want to click a button, or edit an input's text, but I can't do it with this method. I'm storing the elements in a public static class, and I call them from an another public static class. If I don't use this classes, i don't get exception. public static class SiteA { static uidriver = Program.uidriver; public static class Functionality { public static void SomeTest() { //... Inputs.Buttons.Authorize.Click(); //Here I get the exception //Working code: uidriver.FindElement(By.Id("some

WPF user control cannot be seen in inspect

倖福魔咒の 提交于 2019-12-25 07:25:59
问题 Here is a question that I already has an answer. I want to mark here to help others. I have a self-defined tabcontrol. When I do the automation, the control tree of tabitem doesn't populated in inspect. Here is the code: <Window.Resources> <Style x:Key="TabControlStyle1" TargetType="{x:Type TabControl}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TabControl}"> <Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation

how to invoke an applescript from the lock screen?

蹲街弑〆低调 提交于 2019-12-25 07:18:29
问题 I would like to know how to invoke an applescript from the lock screen. I am using Hammerspoon for hotkey triggering. So I am kind of thinking of automating login using hotkeys if not using hammerspoon is there anyother ways? Any suggestion is appreciated 来源: https://stackoverflow.com/questions/39434036/how-to-invoke-an-applescript-from-the-lock-screen

how to automate jcl to run a cobol program on mainframe

*爱你&永不变心* 提交于 2019-12-25 05:45:07
问题 We have a COBOL batch program that we are able to execute manually from JCL. We want to automate this process so that it can execute every 15 minutes. Is there a way to automate the execution of a batch program on the mainframe? I'm a PC guy and I know in windows I can create a .BAT file and set it up in Task Scheduler to run every 15 minutes. I'm essentially trying to do the same thing on the mainframe. 回答1: Is there a way to automate the execution of a batch program on the mainframe? Yes.

jenkins Slave API setLabelString adds to User list

痞子三分冷 提交于 2019-12-25 05:25:34
问题 I have the following script under a JOB, which when run adds the userId to the label of the slave. import jenkins.model.Jenkins import hudson.model.User import hudson.security.Permission import hudson.EnvVars EnvVars envVars = build.getEnvironment(listener); def userId= envVars .get('BUILD_USER_ID') def nodeName= envVars .get('NODE_NAME') def nodeOffpool= envVars .get('NODE_GOING_OFFPOOL') allUsers = User.getAll() println allUsers println "" // add userid as a label if doesnot exist for

VBA - Excel - Automation Error Unspecified Error

感情迁移 提交于 2019-12-25 05:06:30
问题 So I ran into a slight stumbling block and hopefully here someone can help me. In short, I need to visit a string of webpages (the list of the names on each page are already input, that code works fine). As my code visits each page, I need to pull back information. Unfortunately, there's a problem - it can't even make it through the "A" list before I get "Automation Error Unspecified Error" and it's never at the same spot. I've tried the "normal" steps to fix this. I've installed the VB 6

Selenium Automation unable to enter username in Way2Automation website

风格不统一 提交于 2019-12-25 05:05:34
问题 I am trying to do registration for this site Registration page is inside a popup page. HTML Code: <fieldset> <label>Username:</label> <input name="username" required="" type="text"/> </fieldset> When I try to find the element using below tried code, element is not getting find. driver.FindElement(By.XPath(".//*[@id='load_form']/fieldset[1]/input")).SendKeys("Kal"); I have also tried this with using CssSelector, but facing the same issue. driver.FindElement(By.CssSelector("div#load_box form

Casperjs and waitForUrl() to wait for next page

倾然丶 夕夏残阳落幕 提交于 2019-12-25 04:46:51
问题 I'd like to use the waitForUrl() function from http://docs.casperjs.org/en/latest/modules/casper.html#waitforurl . After a login form was send casperjs should wait for the next page is loaded. In the code below you see the "Second variant" that's the way I try to code this and you also see the occuring error message. The "First variant" is working so the dashboard.png is captured. Can someone explain what is wrong with the "Second variant"? // ... // Type and send login Form casper.then