browser.visit just a string of html - zombie.js

With zombie.js,
Is there a way to directly specify the document zombie should visit:
browser.visit('<html><head></head><body><body></html>', ...)
Eg: not a url, just a string.
I know it supports file://path/to/my/page.html, but I just want to feed it with markup directly.
Thank you

Zombie's main author answered this question here: https://github.com/assaf/zombie/issues/314
The answer is: "No."

Zombie can't do it, but the Capsela browser class can - just call loadDocument on an instance of Browser.

Related

PHPUnit Selenium - Can I use verify methods with a message?

In PHPUnit, I want to use methods like verifyText() with an optional message as the last parameter, like I do with assertStringEquals($expected, $actual, $message). It doesn't seem to work. Am I missing something?
I would tell myself to read the code, but I tried and I can't even figure out how any of the verify() methods get called. It must be some __call() function but I don't see it. So that's my follow-up question, how do the verify() methods get called? Then I could override them if I want.
I'm exploring the same question, albeit in the context of Selenium.
I found, grepping the source, an array $autoGeneratedCommands, which is set up in SeleniumTestCase/Driver. The mechanism here implements/maps verifyTextPresent() by a call to verifyCommand(), which calls assertCommand(). Subsequently one of the family assert*() is called... omitting the message in the call. This seems like an inadvertant feature to me. Well, coded bug.

SYNTHESIZE_SINGLETON_FOR_CLASS

will some body explain me in detail that what is SYNTHESIZE_SINGLETON_FOR_CLASS and why we should use it. actually i have search on net that it allow us to access a data without creating object but we can do that by using static method.
so plz if someone can provide me a ref where i can get complete detatil of SYNTHESIZE_SINGLETON_FOR_CLASS from zero.
Do you mean http://cocoawithlove.com/2008/11/singletons-appdelegates-and-top-level.html?
SYNTHESIZE_SINGLETON_FOR_CLASS is just a C macro defined that produce the same code template described in Apple's Creating a Singleton Instance section of the Cocoa Fundamentals Guide. This link already provides the detail what each method does.

where to find whatIsAPrimitive in squeak

Hey, friends, I am using squeak for developing and I found primitives is useful, every comment belong to primitives all mentioned
See Object documentation whatIsAPrimitive
Any friend can help where to see the object document whatIsAPrimitive, thanks first!
You find this documentation as follows: open a class browser, search for the class Object, go to the class side, and look for the method whatIsAPrimitive.
Alternatively, you can select the word whatIsAPrimitive and hit Ctrl-m (or Apple-m on Mac) to search for a method with that name.

How do I use class variables in Clamato?

I discovered Clamato the other day and want to play a bit with it. I don't seem to find how one can declare and use class variables in Clamato. The docs only mention instance variables.
Here's the link to http://clamato.net/ if you didn't already know it.
Here's the source: http://bitbucket.org/avibryant/clamato/src
Thank you for discovering Tommy.
Will also give a play.
In regard to "class variables", your link above states that the language has "no metaclass hierarchy", so a guess would be no class variables, but could be wrong.
You might want to take a look at amber, another smalltalk implementation for the web browser. It has a lot more traction, I've seen presentations at the FOSDEM and ESUG conferences

What is the secret to understanding MSDN COM documentation?

I am looking for "typical" way one navigates MSDN to get a COM class to do what they want.
Example problem: I am looking for an API way to unblock a local file (remove internet zone/mark of the web from a file programmatically).
I found one post on stackoverflow.com that talked about clsid_persistentzoneidentifier. so i searched in MSDN and got to http://msdn.microsoft.com/en-us/library/ms537029(VS.85).aspx. What I am looking for,is what one does after they get to this url. From this location, I am not able to figure what the sequence of operations should be. How do I connect this IZoneIdentifier to IPersistFile? etc. There must be something basic that I am missing wrt COM related documentation. MSDN has interfaces and objects, but nothing that helps me visualize a "sequence" diagram of sorts. Nothing that will get me to understand which COM objects are from same class. hence can/or should be QueryInterfaced, adn which should be CoCreated.
The documentation for that indicates a few things.
The first is that you can call CoCreateInstance, passing CLSID_PersistentZoneIdentifier to get an implementation of these two interfaces:
IPersistFile
IZoneIdentifier
It also says:
Use IPersistFile to attach the object
to the target file and IZoneIdentifier
to examine or to manipulate the zone
ID.
That being said, you can look at the documentation for IPersistFile here:
http://msdn.microsoft.com/en-us/library/ms687223(VS.85).aspx
It shows that there is a Load method, which is what you want to call with the filename to load the implementation with details about the file.
From there, you can call QueryInterface on the IUnknown interface implementation to get the IZoneIdentifier interface and then call the Remove method on it to set the zone to the local machine.
For that purpose, if it's not obvious from the documentation, I like to find sample programs in which relevent APIs are used: either using Google, or perhaps from whichever of the Microsoft SDKs is relevent.
Microsoft SDKs, for example this one, include sample programs.