Capturing popups with Visual Studio Team webtests - visual-studio

We have a number of popups (generated using Javascript) that are displayed during page navigation.
When we record the webtest, the script doesn't capture all of them.
If there a way around this?

The load tests do no render javascript, but operate solely by recording individiual http requests. So no, there is no way around this.
Investigate the new Visual Studio 2010 Coded UI test for testing the operation of the UI.
I think this is the tool for the job, however I do not have any experience with it.

Related

In the extension development of Visual Studio, is there an API similar to the effect of the Decoration API in the extension of VSCode?

I am developing a code completion extension. I have achieved the effect in the figure below in both VSCode and Jetbrains IDE, that is, the completion content is displayed in gray text behind the code. In VSCode, I can achieve it through the Decoration API. In Jetbrains, I can achieve it by rendering a piece of text behind the cursor through EditorCustomElementRenderer. I like this completion method very much. The well-known completion tool Copilot also uses this mode. I have checked a lot of documents, but I still can't find how to implement it in Visual Studio. I want to see how to implement this in Visual Studio, many thanks!
VSCode JetBrains
I researched related documents and tools and found that in VS2019, similar effects cannot be achieved. But Copilot achieves something similar in VS2022. Wondering which API he used? It would be even better if there is such an API in VS2019.
If there is really no related API, I would like to know if there is an API that can render a piece of text near the cursor, which can be in the form of tooltips or something else, similar to the following effect.
tootips
What I hope is that I can control through code when to display this prompt near the cursor.
To summarize my problem is as follows
1. In VS2019, is there an API for rendering a piece of text behind the cursor, similar to Decortaion API in VSCode
2. If not in VS2019, is there any in VS2022?
3. If not, is there a similar API that can display a piece of text behind the cursor? Which can be in the form of tooltips or something else.

sharepoint webparts, Swap image on click

I'm working on sharepoint project, i have like 1000 image i want to upload, i need webpart or something to do swap images on click, is there any web part that do this?
what the best method to use on my situation.
Are you a SharePoint developer? If not, I'd strongly suggest not even trying to do this. Modifying SharePoint beyond out-of-the-box options requires some extensive asp.net and SharePoint-centric developer skills. Even then, it's not a joy to work with.
In the past, for modifying UI interactions, I found the saner approach is to manipulate the DOM post-render. Load up jQuery and then upon page render, do your thing.

stop redirect? watch code in Visual Studio?

I am using Visual Studio to compile and run my ASP.NET website. Now, one of the pages have searchbox acting very odd, because it's redirecting to typical "FileNotFound" page which we're using to redirect when there is a typo in URL or something (and definitely not for searches).
The search is a separate .ascx control, so it's exactly the same for all pages.
So is there a way I can see what's happening behind the scenes to trigger that redirect? It is not firing the click event of the search button either, something is taking place even before the click??!
Is there a way I can watch the code run in Visual Studio without placing a breakpoint, because I do not know where to place it!
I would use Fiddler or Firebug to watch the requests and responses. That might help diagnose where the redirect is happening.

Firefox addon to open source file(s) in your favorite IDE

While developing a web application in Visual Studio, I want to be able to quickly open a source file (an xsl, a js, etc, not the "view source" result) in Visual Studio. My idea is to:
Write out http response headers (in debug mode), identifying the local files (c:...\bla.aspx) that helped build up the response
Read these http headers in FireBug to render them as clickable in a new tab
Make these clickable urls launch a an IDE (configurable) with certain parameters
I am pretty sure that this can be achieved using a combination of http headers, firebug and launchy. But I was wondering if anyone knows of an existing/easier way of achieving this?
For example Zend Studio toolbar.

Firefox add-ons

What Firefox add-ons do you use that are useful for programmers?
I guess it's silly to mention Firebug -- doubt any of us could live without it. Other than that I use the following (only listing dev-related):
Console2: next-generation error console
DOM inspector: as the title might indicate, allows you to browse the DOM
Edit Cookies: change cookies on the fly
Execute JS: ad-hoc Javascript execution
IE Tab: render a page in IE
Inspect This: brings the selected object into the DOM inspector
JSView: display linked javascript and CSS
LORI (Life of Request Info): shows how long it takes to render a page
Measure IT: a popup ruler.
URL Params: shows GET and POST variables
Web Developer: a myriad of tools for the web developer
Here are mine (developer centric):
FireBug - a myriad of productivity enhancing tools, includes javascript debugger, DOM inspector, allows you to edit the CSS/HTML on the fly which is highly valuable for troubleshooing layout and display problems.
Web Developer - again another great developer productivity tool. I mostly use it for quickly validating pages, disabling javascript (yes I disable javascript sometimes, don't you?), viewing cookies, etc.
Tamper Data - lets you tamper with http headers, form values, cookies, etc. prior to posting back to a page, or getting a page. Incredibly valuable for poking and prodding your pages, and seeing how your web app responds when used with slightly malicious intent.
JavaScript Debugger - has a few more features than javascript debugger provided by firebug. Although I must admit, I sparingly use this one since firebug has largely won me over.
Live HTTP Headers - invaluable for troubleshooting, use it frequently. Lets you spy on all HTTP headers communicated back and forth between client and server. It has helped me track down nefarious problems, especially when debugging issues when deploying your web app between environments.
Header Spy - nice addon for the geeky types, shows you the web server and platform a web site runs on in the status bar.
MeasureIt - I don't use this all too frequently, but I've still found it valuable from time to time.
ColorZilla - again, not something I use all that frequently, but when I need it, I need it. Valuable when you want to know a color and you don't want to dig through a CSS file, or open up a graphics editing app to get a color embedded in some image.
Add N Edit Cookies - this has been a great debugging tool in web farms where the load balancer writes a cookie, and uses the cookie value to keep your session "sticky". It allowed me to switch at will between servers to track down problems on specific machine. Also a good tool if you want to try to mess with a site that uses cookies to track your login status/account, and you want to see how your code responds to malformed or hacked info.
Yellowpipe Lynx Viewer Tool - yeah I know what your thinking, lynx, who needs it, its so 1994. But if you are developing a site that needs to take web accessibility into account (meaning accessible to users with visual impairments who use screen readers), or if you need to get a sense of how a web spider/indexer "sees" your site, this tool is invaluable. Granted, you could always just go out and grab Lynx for yourselfhere's the windows xp port that I use.
I've got a handful of other addons that I've used from time to time that I'll just quickly mention: FireFTP (one I installed wasn't stable and I've not tried a newer release), Html Validator (also found this one unstable, least back when I installed like a year ago), IE Tab (I usually just have both IE and FireFox open concurrently, but that is just me, I know many others that find this addon useful).
I'd also recommend the Web Developer extension by Chris Pederick.
As far as web development, especially for javascript, I find Firebug to be invaluable. Web developer toolbar is also very useful.
The ones I have are...
Y-SLow
Live Headers
Firebug
Dom Inspector
One that wasn't mentioned yet is this HTML Validator extension that I found very useful.
#Flávio Amieiro
MeasureIt is an unnecessary extension to have if you install the Web Developer Toolbar. Web Developer Toolbar includes a ruler as one of its features. Under the "Miscellaneous" category for Web Developer click the option "Display Ruler" to use a ruler identical to the MeasureIt one.
That will allow you reduce the number of extensions needed by at least one.
Firefox addons:
FireBug:helps web developers and designers test and inspect front-end code. It provides us with many useful features such as a console panel for logging information, a DOM inspector, detailed information about page elements, and much, much more.
Web Developer-gives you the power disable CSS, edit CSS on the fly, measure certain areas of a page and much more.
ColorZilla
Just click on the icon, hover over the area you'd like to know the hex color for, and click.
Window Resizer
to make sure the layout is displayed properly in the standard resolutions of today.
Total Validator
validating websites much easier by checking HTML, links, CSS and doing a lot more.
Web Developer for web development. Scribefire if you're a blogger-progammer
For web developing I use the Web Developer Toolbar, CSS Viewer and MeasureIt.
But I'm really not one of those who has a thousand of extensions to do everything. I like to keep things simple.
EDIT: Thanks to Dan's answer I don't need MeasureIt anymore. Can't believe I've never seen that! I guess I'll just have to pay more atention to this WebDeveloper toolbar.
Adding to everyones lists, Tamper Data is quite useful, lets you intercept requests and change the data in them.
It can be used to bypass javascript validation and check whether the server side is doing its thing.
I use Web Developer, it's a real time saver.
+1 for LORI ("life-of-request-info"). It's a very convenient alternative for rough measurements of the load time of a particular web page -- the kind of thing that you might otherwise use an external stopwatch for.
New Tab Homepage. Combined with a "speed dial"-type homepage (a personal, fast-loading page of links that you use frequently), helps you get where you're going faster when you open a new browser tab.
LastTab. Changes the behavior of Ctrl+Tab to let you navigate back and forth between your most-recently-used tabs with repeated presses of Ctrl+Tab, the same way that Alt+Tab works in Windows. Also provides a nice view of all open tabs while Ctrl is still being held down for easy navigation. (The resultant behavior is very similar to the Ctrl+Tab behavior in recent releases of Visual Studio.)
FireFTP is good for grabbing/uploading any necessary files.
I find Hackbar to be quite useful. Very useful if you want to edit the querystring part of the url, to test for vulnerabilities, or just general other types of testing where you might end up with complicated query string values.
I was learning DOM inspector, but I've switched to Firebug.
Some of which has been missed above are here
Load Time Analyzer – View detailed graphs of the loading time of web pages in firefox. The graphs display events like page requests, image loading times etc.
Poster – A must have tool for web developers enabling them to interact with web services and other web resources.
Aardvark – A cool extension for web developers and designers, allows them to view CSS attributes, id, class by highlighting page element individually.
Fiddler is a really great debugging proxy. Think of it as a more powerful version of the "Net" panel in Firebug or the Live HTTP headers.
It used to be an IE-only extension, now it also has hooks into Firefox.
Groundspeed, is useful for testing server side code. It was created for input validation tests during pentest, but can be useful for any test that require manipulating input (similar to TamperData).
It lets you control the form elements in the page, you can change their type and other attributes (size, lenght, javascript event handlers, etc). So for example you can change a hidden field or a select to a textbox and then enter any value to test the server response and stuff like that.

Resources