I'm having an issue running WatiN under CruiseControl.net, where on a .forceclose, watin is closing all open browser instances. I have multiple projects running under cruisecontrol, and its not uncommon for some of those projects to be building and testing at the same time. There has been more than one occasion where watin will close the browser window for a different project, causing it to fail. In my local tests, creating my watin instance under a new process fixes this issue. But running under cruisecontrol, when doing this, I lose my IE object:
Object reference not set to an instance of an object.
Running CC.net as a service
CC.Net server is Windows 2003
IE6
Any thoughts?
As far as I remember, WatiN won't close a browser unless you specifically closed them, like:
ie.Close();
You still might want to set/check you browser AutoClose property:
ie.AutoClose = false;
Related
The command:
node-debug sls offline
opens a new browser window every time it is run.
How do we stop it from opening a new window every time? I want to reuse the existing window!
This is a known issue with node inspector. Take a look here.
Since 0.9.0 we use https://github.com/benderjs/browser-launcher2 to
start the browser, and make sure it's Chrome/Chromium/Opera (i.e. the
browsers that can properly render node inspector; we detect installed
browsers in the system and choose the most appropriate one; earlier we
used opener module which just delegated opening the browser to the OS,
which would open the defaul browser, which could have been e.g.
Firefox) and this could be the reason why the behavior has changed.
browser-launcher2 actually does a bit more than just launching a
browser, for instance it creates a new profile for Chrome in a
subfolder of ~/ - this is probably the issue that #CalvinScott
reported (i.e. Chrome that was opened was the new profile created by
browser-launcher, not your original profile; you should be able to
open your original profile of Chrome normally)
Also, you may consider this:
Since version 6.3, Node.js provides a buit-in DevTools-based debugger
which mostly deprecates Node Inspector, see e.g. this blog post to get
started. The built-in debugger is developed directly by the
V8/Chromium team and provides certain advanced features (e.g.
long/async stack traces) that are too difficult to implement in Node
Inspector.
This is a follow-up to a previous question where the answer to "How do I ensure I see the latest JS code in my Task Pane add-in" involved controlling the client side caching behavior via server-added meta/no-cache tags (or versioning the server resources).
However, I am looking for a manual way, on the client, for the end-user to clear out the client side cache that appears to be storing JavaScript files and preventing an updated JS file on the server from being used by the Task Pane add-in. During development, I'll be updating the JS resources frequently on the server and I am looking for a client side solution that allows those updated files to be used.
Environment: Desktop version of Excel 2016 running on Mac (OSX 10.11.5)
Task Pane add-in using v1.2 of the Excel/Office.js.
Scenario: deploy add-in artifacts to web server, run add-in on Mac. Then update code in foo.js in add-in, re-deploy to web server. Run add-in and see old (pre-update) behavior from foo.js.
What I have tried:
On the same Mac, loaded foo.js directly from the web app in Safari. I can see the changes in the js code that I expect to be in the updated version.
Cleared the Safari cache (Privacy > Remove All Website Data) (I suspected that this would not work based on #1 - Safari does not appear to share a cache with Excel but worth a shot) - did not change anything.
Poked around under ~/Library/Containers/com.microsoft.Excel trying
to find a cache - deleted ~/Library/Containers/com.microsoft.Excel/Data/Library/Caches/com.microsoft.Excel - no help.
Used the Reload menu item from the Task Pane's context menu (looks
like [i] on the Mac) - no difference: still seeing old foo.js.
Where are the JavaScript files referenced by an Excel (desktop) 2016 Task Pane add-in stored? (on the Mac) and how can the end user remove them?
I stumbled upon com.Microsoft.OsfWebHost while poking around using the "defaults" command from a Terminal on the Mac. Some googling turned up this article which basically provided the answer. In a slight refinement to what is instructed there, this is what I did:
ensured that I had quit Excel
in Finder, navigated to
~/Library/Containers/com.Microsoft.OsfWebHost/Data/Library/Caches
renamed (or deleted) the folder named "com.Microsoft.OsfWebHost" there
opened my workbook in Excel (it already has the add-in Inserted)
nothing seemed to be loading, so I used the Reload command from the context menu in the Task Pane
Now I could see that my updated version of the java script file has been loaded.
This is based on empirical evidence only, no corroboration from Microsoft or Apple doc, so your mileage may vary.
BTW, there are some interesting "defaults" properties for the com.Microsoft.OsfWebHost:
defaults read com.Microsoft.OsfWebHost
{
WebKitCacheModelPreferenceKey = 1;
WebKitDebugFullPageZoomPreferenceKey = 1;
WebKitPluginsEnabled = 0;
WebKitUsesPageCachePreferenceKey = 0;
}
Googling for WebKitCacheModelPreferenceKey did not turn up any official documentation, but there seem to be suggestions that setting it to 0 might suppress caching.
I am using build deploy test workflow to execute testcases on Lab environment-CodedUI. Browser IE instance remains open after test execution is over.
I am thinking if I can add something to my build workflow, which send instructions on test agent machine to close that browser instance. Is that possible?
I execute testcases in bunch. No testcase close the browser instance. They work on same browser instance to save login time. Hence I want to close browser once execution is over
Regards,
Gbhavsar
You can use the inbuilt functionality of settings
browserInstance.CloseOnPlaybackCleanup = true
or use a custom .bat file to close/kill all open IE/Chrome/FireFox processes in your post test script.
See https://blogs.msdn.microsoft.com/visualstudioalm/2012/11/08/coded-ui-test-why-does-application-close-after-each-test-in-visual-studio-2012/
I have an MVC3 app that's been working for quite a while and today began crashing anytime I launch a debugging session with IE as the initial browser. If my initial browser is Chrome or FF - no problem. Further....if I open the site with IE _after it's been launched to one of these other browsers, no problem. The debugger's break points respond just as expected. So that's pretty strange, yes?
I can F10 without hitting any problems until the point where the browser is invoked and, up to this point, haven't been able to catch the last couple lines in VS's output windows - it crashes and restarts without giving opportunity to copy any of that output.
Event viewer shows:
Fault bucket 3561940412, type 5
Event Name: CLR20r3
Exception code: 0xe0434352
(there's more erreta if you'd like deeper details) - searching against those codes looks like it's a fairly general/generic error.
I've stepped out to the file system and deleted the .obj and .bin folders for all the projects in the solution, rebooted a couple times, and am in the process of getting on with my life cuz, as of right now, this is easy enough to work around.
I suppose i could delete windows temp files and check again. Any other thoughts?
I want to launch the browser in a different process when a particular link is clicked on the page. When I checked the net I found the following tip: http://www.dslreports.com/faq/3849 . But there we have to change the registry. Is there any simple way of doing this without touching the registry?
If you use the Google Chrome browser, each new window or tab runs in a separate process. Internet Explorer version 8 will do the same (it's currently in the second beta round).
Earlier versions of IE will run a new window in a separate process if it is launched from, say, the Start menu or the command line, or a link in an email (but not by clicking a link within IE). I imagine you could create a proxy that the client would run through, which would intercept the links you care about and launch them by running a command line request. That seems like more trouble than mucking with the registry though (assuming that registry change still works -- looks like your link is from 2002).
I don't believe this is possible unless you change the client computer setup or software it's running.
Why do you want to do this?