I'm using VS 2010. And in VS 2010 it's even more painful now to attach to the worker process when you want to test your local IIS site via IIS, not the VS built-in web server.
It's more painful because now when you select the worker process () via the Debug Menu | Attach to Process | w3wp.exe it brings up an additional prompt asking if you're sure you want to do this.
Even before this, attaching to the process in previous versions of VS was just outright painful. I must do this 200 times a day which wastes a lot of my time when it takes 5-10 seconds to click through and do this.
Now if you've got 2 different worker processes going, then I can see a need to choose. But before that, just getting to that attach screen is simply painful.
Anyone know a shortcut or just a quicker way other than the attach to process dialog in order to attach to the worker process in VS?
I don't understand why Microsoft doesn't add a nice toolbar icon or something that jumps you right to that Attach to Dialog screen and even better you could be able to specify only to show worker processes as an option which would save me a hell of a log of time sifting through that list even though it's already alphabetized. I still have to scroll to get to it.
Anyway, it's becoming a huge annoyance now..I'm really tired of the long way to get the attachment going to that process every single time.
Hm, not a great leap over and above what you are doing, but it may ease your workflow. have you taken a look at command customization?
Click Tools -> Customize ... (or Right-click tool bar and select Customize ...)
From Customize dialog, click Commands
Select your target, (I suggest Context menu)
Select your sub target (if Context menu, select Editor Context Menus | Code Window)
Click Add Command
From Add Command dialog, select Debug category
Select Attach to Process... from command list (near top)
Click OK
Click Close
Use your new shortcut!
Hope this helps! :)
ps: if you added Attach to Process... command to Code Window context menu, you should be able to launch the Attach to Process dialog from right clicking anywhere in a code window.
Record a macro while attaching and assign a shortcut for that macro and/or assign a menu item for it.
Steps:
Tools -> Macros ->Record Temporary macro
Attach to w3wp, Click on Ignore, etc
Stop recording the macro
Save it
To add a menu item (say under Debug) Right click on VS's Menu strip -> Customize... ->Commands -> ... Add Command -> Macros.YourMacroNAme(DebugIIS for eg)
Related
How to switch to a different task, or view the previously opened windows in eWAM without using the mouse? I have tried ALT+TAB it is not working.
Due to the "modal" nature of Wynsure it is often not advised to switch between screens when in a multi step process for sub process. However, when relevant you can use Ctrl+F6 to cycle between open windows as an alternative to selecting them through he "View" menu with the mouse. Here is a list of the most popular Wynsure shortcuts
Ctrl+F2 to insert the current date in any date field (must be active)
Ctrl+F4 to close a window
Ctrl+F6 to cycle between open windows
Ctrl+F10 to toggle a window from "maximized" in the workbench or "restored" as a separate window in from the the application.
My AutoIt script simulates mouse clicks. First a right click in one place, then a left click in one of many other points. I achieved that with MouseClick() and it works fine.
But now I want the script to work in "background" so I used ControlClick(). But there's no control ID. This is what I tried:
$square = Floor(Random(0,$length)) ;this one gets length of array with coordinates
;MouseClick("right", 1634,195 ,1,1) first version-works fine
ControlClick("Medivia","", "", "right",1,1634,195)
;MouseClick("left", $cordX[$square], $cordY[$square]) first version-works fine
ControlClick("Medivia","", "", "left",1 ,$cordX[$square] ,$cordY[$square])
The script clicks, but only in the place where I leave the mouse pointer. It does not move the mouse pointer by itself. Could anybody help me?
Answer Limitation: To use any of the Control* APIs from AutoIT, you're going to need to be interacting with a real Windows control.
If you just want to do "random" clicks, you probably don't need a real Windows control and should not be relying on ControlClick.
If you're trying to click on the "background" of Windows, you probably want to just minimize all open windows, which you can accomplish with WinMinimizeAll.
GUI clicks with Qt and other frameworks without real Windows Controls
Some frameworks like Qt will not give you a real Windows control for many of the default GUI buttons and the like, so when using AutoIT's Windows Info tool, as well as many of the UI spy tools out there, that info will be missing.
What you may need and I currently need is to resort are workarounds. For your case, it would help if I could see a screenshot of the sequence you're trying to automate; I could give better advice after seeing that.
For my case, I needed to click on a Quit button that had no controls and the developer told me he didn't have a way (or know a way) to add accessible names to the pop-up I was trying to hook into, even though I could hook to the main app's hWND. Luckily, that quit-box had a special color for the Quit button, which allowed me to use AutoIT's PixelSearch to locate it.
When you don't have cool helpers like that, it's usually best to determine the location of the main window, and whatever pixel-offset you need to find what you're looking for.
Windows 10 SciTE 3.6.6
I have a window with a toolbar that contains a drop down that I am trying to get a value from but I am unable to find the window handle
The menu and item looks like this
I need to wait for a process to finish (but nothing is busy so waiting for a window does not seem to help). I know for sure that the process is finished if this drop down contains a 1, it will be blank while the process is running. I could also check if a sub menu item under Documents is enabled, but I have not been able to find a handle to the menu either.
When I drag the selector from AU3Info over the item outlines the main window and all values in the Control tab are blank
I have ASP.net webform that opens a popup window. example window.open(""); The POPUP window closes itself when a hyperlink is clicked inside. [Like search for person by name, select person and pass the person back to the parent form.] Then posts back from the javascript. When it is a full window[not a popup], It does not postback or close the window. When not recording for a test, it opens the modal popup and closes\posts back fine.
The real problem is you cannot finish a test if you cannot close the popup and transfer the selected values back to the parent form.
How do I stop the test recorder from opening the window in full screen. Or how can I make the popup perform normally[close and postback the data] when windowed.
Here is a little info. In the popup I force a postback after closing the window here.
function CancelPopupWindow() {
self.close();
//Here to force a post back on the parent. This is used to automatically save the data
window.opener.__doPostBack('', '');
}
Anyone else hating this problem. Please vote for a fix at User Voice.
https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/16390135-make-web-performance-popup-javascript-dialogs-open
There is a workaround. The program Fiddler can be used to record the entire test then use Fiddler's menu => File => Export sessions => All sessions => Visual Studio web test and then follow the remaining prompts. That will produce a .webtest file. Like any other .webtest file it will probably need work to resolve dynamic data etc.
A variations is to record as much as you can with Visual Studio. From the start of the test up until the problem occurs. If possible you could also record the completion of the test. So just the piece with the problem is omitted. You can also record the problem part with Fiddler and save that. Now you have two or possible three .webtest files that cover the whole test. Now just merge them. With the Visual Studio web test editor you can copy requests and paste them into other tests. (Or else where in the same test. You can also drag requests in a .webtest to reorder them.
The purpose of recording the steps that use JavaScript is to learn enough of what they do so as to replicate enough of their action for the web test. So mixing pieces from different recordings is valid.
The .webtest file contains XML and so can be edited with a text editor. I often make changes in this way, for example to replace many occurrences of the same string with a context parameter. Editing at this text level can help when merging pieces from multiple files. Just be careful to make backups. Visual Studio just gives refuses to load .webtest files with mal-formed XML.
Functionnaly :
On one of my components of my application, I have an editing/lock system. When a user starts editing, he locks the file so other users cannot edit it.
Problem scenario : When the user activates "edition mode" and leaves screen, I would like to show a alert with two options : save changes, or discard changes.
There are different ways to exit screen :
There is a List on the left side containing other possible editabel data. A click changes the data in my component.
There is a menubar on top leading to other screens.
The edition component is embedded in a Tab navigator. When changing tabs, the alert has to show.
Closing browser.
Do I have to catch all of these events and plug at all those places?
Is there any kind of focusout mecanism?
The answer to the first question is: YES.
You need to watch all possible exit events that could harm the currently edited data.
Well, the problem is now how to manage this properly. Using an MVC framework you would trigger the appropriate commands from your components:
CHANGE_LIST_ITEM (new item)
CHANGE_TAB (new tab)
CHANGE_SCREEN (new screen)
Each command then checks if the currently edited tab has been saved or not. If not, it displays the Alert. Else, if there are no changes, it allows the list, the screen chooser and the tab bar to continue.
So your components (list, screens, tabs) need to implement some kind of rollback or preventDefault mechanism. Generally, changing their state must be allowed by a central validator (in MVC the command).
In the case of the list: I would suggest that the list is not selectable by mouse click but only programmatically. You set a listener on the list item click event. If the command allows setting of a new item it will notify the list. In MVC usually by sending an async message that gets received by the list's mediator. [[And even more correct: The command would set some model properties (e.g. currentListItem) and the model than sends an async message.]]
Edit: For the browser close event, you need to call a JavaScript expert.