automation

How to simulate a HOLD keydown event using pywin32?

六眼飞鱼酱① 提交于 2020-01-06 06:43:34
问题 I am trying to get this piece of python code to work on windows: import win32process, win32con, win32gui, win32api, time HWND = win32gui.GetActiveWindow() win32api.PostMessage(HWND, win32con.WM_KEYDOWN, win32con.VK_SPACE, 0) time.sleep(6) win32api.PostMessage(HWND, win32con.WM_KEYUP, win32con.VK_SPACE, 0) It is supposed to simulate someone holding down the space key, but it does not work and does not provide any sort of error message. I believe I may be doing something wrong with HWND, but I

How to extract content from other websites automatically?

纵然是瞬间 提交于 2020-01-06 06:36:36
问题 I want to extract a specific data from the website from its pages... I dont want to get all the contents of a specific page but i need only some portion (may be data only inside a table or content_div) and i want to do it repeatedly along all the pages of the website.. How can i do that? 回答1: Use curl to retreive the content and xPath to select the individual elements. Be aware of copyright though. 回答2: "extracting content from other websites" is called screen scraping or web scraping. simple

What is the easiest way to automate Excel tasks

人走茶凉 提交于 2020-01-06 05:22:52
问题 If I need to automate a series a task on an excel sheet like remove all rows where column 3 contains value "asdf" remove column 7 and column 9 sort according to column 4 etc. What is the easiest way of automating such tasks in excel? I think it would recording a macro but sometimes macro have to be edited a lot to actually make them work and even then macros stop if the excel sheet has a variation. Editing macro scripts could be a time taking process which becomes inefficient for such tasks.

Read Items from Control in another Application

☆樱花仙子☆ 提交于 2020-01-06 04:46:08
问题 I have an MDI application for which I do not have source for. I believe it is an MFC application. I need to automate some of it's functionality. It has a form with a listview type control on it. I would like to be able to read that list from my new C# application to know what the items are so I can select the correct one. I have tried Spy++ from VS2008 but it cannot see the listview control. There are no windows messages that are useful. How can I make the items in this list available to my

How to record the script for dynamic ID generation in Selenium

丶灬走出姿态 提交于 2020-01-06 04:07:05
问题 I am working on Selenium IDE. Currently I am facing problem related to dynamic id. I have recorded one script, but when I run it again it fails because id changes every time. Is there any way to get rid of this?? Waiting for reply thanks in advance 回答1: You should use other type of locators (for example xPath - as Pavel Janicek wrote). Here is an article about Selenium locators http://www.qaautomation.net/?p=188 Read it and choose the best way for you. 回答2: Generally - try switching from ID

How to record the script for dynamic ID generation in Selenium

眉间皱痕 提交于 2020-01-06 04:07:04
问题 I am working on Selenium IDE. Currently I am facing problem related to dynamic id. I have recorded one script, but when I run it again it fails because id changes every time. Is there any way to get rid of this?? Waiting for reply thanks in advance 回答1: You should use other type of locators (for example xPath - as Pavel Janicek wrote). Here is an article about Selenium locators http://www.qaautomation.net/?p=188 Read it and choose the best way for you. 回答2: Generally - try switching from ID

How to automate SSRS install and configuration

随声附和 提交于 2020-01-06 03:59:08
问题 This is my scenario: I have to setup a number of TFS 2013 Application Tier nodes (at least 6) and I am trying to automate the process, the nodes hosts also SQL Server Reporting Services 2012 SP1 in "cluster" (better group) configuration. I have no problem in installing SQL, but I am stuck with Reporting Services configuration. The documentation states to use WMI to configure URLs, and the MSReportServer_ConfigurationSetting class has a SetVirtualDirectory which seems appropriate. I see that

How to automatically “like” Twitter tweets with JavaScript helper console code

蹲街弑〆低调 提交于 2020-01-05 09:29:27
问题 I am trying to search for a term in Twitter, and then "like" the tweets that come up, using JavaScript code in the console. I tried making a class substitution into this working facebook code for auto-inviting users to like your page: var inputs = document.querySelectorAll('a._42ft._4jy0._4jy3._517h'); for(var i=1; i<inputs.length;i++) { inputs[i].click(); } When I inspect the heart icon used by Twitter for liking a tweet, i see <button class="ProfileTweet-actionButton js-actionButton js

How to automatically “like” Twitter tweets with JavaScript helper console code

独自空忆成欢 提交于 2020-01-05 09:28:08
问题 I am trying to search for a term in Twitter, and then "like" the tweets that come up, using JavaScript code in the console. I tried making a class substitution into this working facebook code for auto-inviting users to like your page: var inputs = document.querySelectorAll('a._42ft._4jy0._4jy3._517h'); for(var i=1; i<inputs.length;i++) { inputs[i].click(); } When I inspect the heart icon used by Twitter for liking a tweet, i see <button class="ProfileTweet-actionButton js-actionButton js

Appium automation test: How to get element or text from custom UI in android [android.view.View]

别来无恙 提交于 2020-01-05 09:26:49
问题 I beginner test automation on Android by Appium. I use IUAtomatorviewer to get eLement from Android Application But i think my applicatoin is from customs UI. i see that is android.support.v7.widget.RecyclerView / android.view.View in [android.view.View] element, there no text or other informatoin i see it include TextView, Image... same a item in listview Here is my code AndroidElement el = driver.findElement(By.id(io.***.vodi:id/message_list_item_chat_id)); AndroidElement el2 =