Reading material on hosting MSHTML.DLL directly (not WebBrowser)? [closed] - winapi

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Can anyone suggest good reading material on hosting MSHTML.DLL/Trident directly (not SHDOCVW.DLL/WebBrowser)? I want to use it for GUI elements, sometimes major ones, in C++. I need HTML rendering, JavaScript with extra host-provided DOM methods and properties, events.
My impression is that WebBrowser just adds an extra layer providing nothing I need, and more than that, things I'll have to work to disable: cross-page navigation, history, UI, context menus, registry dependencies, generic Active Document hosting, downloading, etc.
All the articles I find talk about the WebBrowser control, even if calling it MSHTML in many cases. The Microsoft documentation makes it difficult to understand what's MSHTML and what's WebBrowser; for example, "Other MSHTML Interfaces" lists IWebBrowser2, which is not part of MSHTML.DLL, among other things.

MSHTML is an Active Document server. WebBrowser and Internet Explorer are Active Document hosts. If you want to host MSHTML directly, you get to implement all your own Active Document hosting interfaces, e.g. IOleDocumentSite or IOleInPlaceFrame (this is on top of regular OLE hosting interfaces, that might be provided by your framework of choice).
In addition, MSHTML requires its host to implement ITargetContainer and ITargetFrame. These are poorly documented.
Besides, as you probably already know, MSHTML doesn't support navigation. You have to download (or otherwise obtain) HTML content and feed it to the object.
For these reasons, it is difficult to host MSHTML directly, except in certain limited scenarios (e.g. as a UI-less HTML parser, see WalkAll sample). This is why there is so little information and so few samples on the topic. Most of the time, it's not worth the trouble. Just host a WebBrowser control, navigate it to about:blank, grab the MSHTML instance it hosts with IWebBrowser2::get_Document, and do whatever you want with it.

Related

Dynamic scraping and parsing [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Original Question rephrased:
I know a good amount PHP, Js, CSS, OOP and have recently honed my regex skills by using the vim editor's netrw and elinks plugins to download a series of web pages (about a million lines) that were parsed and made ready for uploading into my website. I work on a linux/ubuntu system, a localhost setup and this particular project is implementing the Concrete5 cms - which is written in PHP.
Seeing the benefits of scraping and parsing information, I would like to have my site dynamically perform this function, though on a much smaller scale; such as, enabling my new user to transfer their personal information from another website into mine - which will typically be under a secure connection (though not always) and password.
Question: What is the best tool (scripting language) to use for this? I do not know either Perl or Ruby but I believe either one of those would be a good choice. I have also heard AWK and SED. I'm sure I can figure out HOW to do it once I begin studying the language. I would really appreciate some experienced input on which language would be the best to begin investing my time into learning it.
Thanks for your help.
I would strongly recommend Ruby and Capybara for web scraping. (See the non-test related examples toward the bottom of the capybara page). Reasons:
Simple, short scraping syntax, cookie support, js support.
Ruby has many other uses, a friendly syntax, and an active job market.
Capybara has multiple supported drivers. You can run a real browser (visibly), a real browser headlessly (invisibly) so javascript sites work. With the same code, you can toggle the driver to run http requests with no js (mechanize) for speed. This helps you overcome many hurdles (like needing to run JS/Ajax), needing to see the interaction, etc. with a change to a single line of code (Capybara.current_driver = :some_driver).
Drivers: Capybara-Webkit, Capybara-Mechanize
Ability to use CS, or Xpath selectors, whatever you're comfortable with.
Active development, and an ecosystem growing rapidly around the underlying technologies.
Perl has two very nice ready-to-use tools for scraping that I know of: Web::Scraper and Scrappy. Both are able to work with CSS3 and XPath selectors for identifying elements; Scrappy builds on Web::Scraper and adds integrated scraping and crawling, with a nice URL-matching system to select the links to follow to gather more information, (while Web::Scraper works with a single document). It moves between pages using the well-established and robust WWW::Mechanize library, which is smart, reliable, and aware of authentication and cookies.
If you want to get into the lower level yourself, there are a lot of good tools to build on, including the aforementioned WWW::Mechanize, HTML::TreeBuilder, HTML::TreeBuilder::XPath, HTML::TableExtractor and more.

Showing power to every user harms Usability of a Requirement Management software? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I am working on a Requirement Management software which is truly powerful in features. But now its cluttered with usability issues & I have never seen such complex user xperience like this one. What I found, all features/powers are accessible to every users whoever uses this product.Whether its super Admin or end user. Also found every user base uses some specific features, not all features.
My thought is, can I off/hide secondary user controls which are not that much navigated? Should I provide configurable user controls to different users? Please let me know your thoughts.
Thanks-
Yes you can, and this is exactly what many apps do:
It is common to have a set of easily reached, commonly used gui elements (think the tool palette in Photoshop, or the ribbon in Office) meanwhile less often accessed commands are hidden behind the application menus (File, Edit, View etc) and usually duplicate the commands in the palette / ribbon.
Configurable or not is difficult to give an answer to that is more useful than 'it depends'.
This is really super-power user territory, and I'd suggest that you do some research with your target users.
Don't ask them if they configure menus, just ask them to show you how they use a common set of applications (which have configurable menus) and observe whether they have or have not changed anything outside of the default.
The reasons you shouldn't ask direct are that:
1) People might not know what you're on about
2) They might just tell you what they think you want to hear (this is very common)
3) People will oftewn say 'yes' when you ask them if they want something, whether it's useful or not (it's probably to do with loss aversion)

UI Automation Testing Tools [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 11 months ago.
Improve this question
I'm working on UI automation.
We are using the following tools.
Bewildr
Snoop
Our WPF application uses a custom framework developed by the company. Many of the buttons are generated dynamically. For example, the controls that have ID guids, get new ID guids every time I run the program. Many controls don't have names.
Are there any other tools which might be worth a look?
Is this commercial or personal - ie do you have a budget? That'll affect whether you might consider the Mercury or HP suites, or just go straight to opensource ;)
http://en.wikipedia.org/wiki/List_of_GUI_testing_tools provides a good list of GUI testing tools. AutoIT is nice and easy to learn and use, especially if you're a coder anyway. Phantom AL and IcuTest are both useful for WPF applications.
If you have a budget, there's not much better than the Mercury/HP toolsets - QTP (QuickTest Pro) and WinRunner - the former uses VBScript while the later uses a custom Test Script Language - very clever for quickly writing tests.
I won't provide links to them all as the Wiki article already has that, but I hope that helps.
As for targeting the names, hypothetically you could work out the order in which they're being loaded and tab through them that way, ignoring names and guids. Alternatively you could send clicks to targetted coordinates on the app if you know where the buttons are going to be.
Mark,
There's nothing you mention that bewildr can't already do. Even if you don't know the name, id or even the type of object, you can always get elements dynamically using the .children method... See this for a brief intro: http://www.natontesting.com/2010/11/27/bewildr-0-1-7/
...and here for code examples:
https://github.com/natritmeyer/bewildr/blob/82cd1e907484583be26bc22024ca6a8f34c0d6a4/features/step_definitions/hierarchy_steps.rb
#Jon Abaca
As my knowledge, It depends on which interfaces you are going to test(mobile/web) and you are going to test those applications with code knowledge staff or not.
with less knowledge of coding, mobile testing, cross browsing and ci/cd. you can go with Katalon-studio, yes it's free
or else better to go with Selenium.
https://github.com/last-hit-aab/last-hit is a UI automation testing tool for chrome developer to test their web site without change test script

Which language should I use to program a GUI application? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I would like to write a GUI application for management of information (text documents). In more details, it should be similar to the TiddlyWiki. I would like to have there some good visual effects (like nice representation for three structures, which you can rotate, some sound). I also would like to include some communication via Internet (for sharing and collaboration). In should include some features of such applications as a web browser, word processor, Skype.
Which programming language should I use?
I like the idea of usage of JavaScripts (like TddlyWiki). The good thing about that, is that user should not install anything. They open a file in a browser and it works! The bad thing is that JavaScript cannot communicate via internet with other applications.
I think the choice of the programming language, in my case, id conditioned by 2 things:
What can be done with this programming language (which restrictions are there).
How easy to program. I would like to have "block" which can do a lot of things (rather than to program then and, in this way, to "rediscover a bicycle")
ADDED:
I would like to make it platform independent.
There is no simple solution in 2010.
If you want to make your GUI platform independent, you have these options:
Run it as a JavaScript application inside the browser with a server running a program + database you like. Hard to get to work but the most simple solution for your users. There are good editors like CKEditor but they use HTML underneath, and sometimes, they are slow or weird. Also, they are absolutely unsuited for large amounts of text.
Use Java. Java is available for many platforms but not all. It comes with an UI framework called Swing that could be better. Java offers a huge set of frameworks and libraries. Most are free to use but it will take some time for you to select the best ones in your case. Plus: So far, there are no good text editor components in Java. So you either have to buy one or you must live with some ... oddities.
Use .NET/Mono. Not available right away for many platforms but you can find binary installers for Mono for the major ones (Linux and Mac) and Mono is available as source, so your fans can build versions for their favorite OS themselves. There are pretty good editor components for .NET but almost everything for .NET is either not free (as in freedom) or costs money.

What's a good browser-based terminal emulator? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
We have several curses style applications which we'd like to provide access to through a browser-based interface.
We have an application from another vendor which ostensibly provides this based on an old version of the JTA (Java Telnet App) but that applet doesn't handle things like resizing well, and has relatively poor support for scroll-back buffers and copy/paste.
In this day of Ajax-based interfaces, I'm curious if there are any good, free solutions.
Thanks to this web site, I saw references to Reflection's web-based terminal emulator,
but that's probably too expensive for our needs.
Some of the potential candidates I've seen include
anyterm
ajaxterm
No scrollback bar
but I haven't had a chance to do a detailed evaluation.
I use Ajaxterm frequently as a handy way to administer a web server from anywhere. It worked well for me until I switched to Chrome as my primary browser. Ajaxterm works great with Firefox and IE8, but is unusable with Chrome, Safari and Opera.
I found that on Chrome, Safari and Opera, many ‘special’ keys don’t get passed through to Ajaxterm, including backspace, the arrow keys, ctrl+c, ctrl+h, home, end, etc. Opera is even worse: when you press shift, the keypress gets translated into ^P, so you can’t type capitals. These things are showstoppers for me; they are probably showstoppers for you too.
Anyterm worked fine for me in all browsers I tried, including IE6.
Other things to bear in mind:
Anyterm keeps a connection open constantly while it is running, and uses a second connection for keypresses. All browsers have a limit on the number of concurrent connections to a single host. IE 7 and below have a limit of two concurrent connections (as required by the HTTP spec), so a single instance of Anyterm could max out connections to that host much of the time. However this is reasonably easy to work round by simply using a separate hostname for Anyterm.
Ajaxterm polls for updates, so it does not keep a connection open constantly. It uses the same connection for keypresses and screen updates. On the other hand the screen does not always update as soon as it could, and the network overhead per screen update is greater.
Ajaxterm updates the whole screen in one go, even to change a single character. Anyterm updates only the portion of the screen that has changed. It is debatable which is faster; a whole screen can usually fit in a single packet anyway, and Anyterm’s approach has greater processing overhead, both on the server and client side.
Note: My comments on Ajaxterm are based on Ajaxterm 0.10. I haven’t tried 0.11, which apparently includes ‘minor patches’. My comments on Anyterm are based on the demos available on their site. I haven’t actually used it in anger.
I tried https://github.com/chjj/tty.js/ today and it works well, you can have a try.
Wondering how come nobody mentioned about http://shellinabox.com . I evaluated shellinabox & ajaxterm. Shellinabox is faster than ajaxterm (I do not know the internal details). Also, shellinabox can login a user without needing to give the user explicit ssh access (not sure if it is a great plus).
Shellinabox has issues running inside an iframe though. But if you are looking to run something standalone to access your server, guess shellinabox is the best bet.
I have been running Rails Tutorial site for sometime now. I eventually deployed Gateone - https://github.com/liftoff/GateOne‎ but it had quite a few issues with browser + OS combinations. Finally we created our own pseudo terminal (it does not support vim etc). Check https://github.com/pocha/terminal-codelearn .

Resources