Dev.Opera - Follow the standards, break the rulesDev.Opera - Follow the standards, break the rules

Login

Lost password?

Forums » Opera Dragonfly Discussions

Discuss Opera Dragonfly, Opera's new developer tools.

Note: You need to login to post in the forums. if you don't have an account you first need to sign up.

By zedshaw anchor Wednesday, 30. September 2009, 19:46:25

avatar

Is OperaWatir, or any implementation of STP/0(1/PB/Extended 0) Available?

Hi,

So I was asking around if there were browsers that had a remote accessible port for instrumentation. Things like connect to a port and make the browser run through a form fillout process. Something like doing Watir against a remote running web browser.

And, then I stumble on this http://my.opera.com/core/blog/2009/03/06/test-automation-with-operawatir and I'm thinking "Jackpot! Man if Opera has this I am totally gonna pimp the hell out of it."

But, there's no code. That blog post is just a big tease. Lame.

Alright, next best thing: read the spec:

http://dragonfly.opera.com/app/scope-interface/

Awesome! A protocol specification. I know protocols, I'll just implement what I want with this.

Then I read it. What is this? Does Dragonfly support STP/0, STP/1, Extended STP/0, or Protocol Buffers? What is the actual raw protocol being sent? *services is NOT the real protocol. Where's the reference implementation? That Javascript link to all of Dragonfly?

Which leads me to my questions:

1) I want to connect to Opera 10 from Python and make the browser fill out forms and click on stuff. What protocol do I use: STP/0, STP/1, Extended STP/0, or Protocol Buffers.
2) Given the answer to #2, where is an initial implementation of a client I can read as a reference while implementing my client.
3) Is the source to OperaWatir available, and if not, why? If it's a matter of maintenance and open source fear, then I'll willingly help you manage and learn about doing open source.

If I could get this information I'd be able to write a very awesome test framework based on a real need I've got. I'd open source it and talk about Opera as being awesome.

If I can't get it, then that's lame. Just saying. :-)

By greut anchor Wednesday, 30. September 2009, 20:16:08

avatarhear hear!!

By aleto anchor Thursday, 1. October 2009, 13:11:24

avatarFor Opera 10 you have to use STP/0. We have a python proxy mainly for developing and mainly for STP/1, but it works with STP/0 as well. We plan to publish all scope related code soon (if you're very impatient send me an email and i will send you the proxy code).

STP/1 is much more mature and reliable than the 0 version, especially the exec service which you would need to control the browser remotely. Also STP/1 breaks more or less with STP/0, that is the reason that we have waited so long with publishing the scope protocol, but still it will take some time till STP/1 is available in a public Opera version.

By zedshaw anchor Thursday, 1. October 2009, 17:18:51

avatar@aleto Ok, so that answers #1, that I need to use STP/0 to talk to the browser. Is it possible to either get at the Python code you're talking about, or at a minimum can you point me at where in the Dragonfly code .zip the actual protocol is dealt with? Hopefully it's not sprinkled all over.

By aleto anchor Thursday, 1. October 2009, 19:01:38

avatarIt starts in client/client.js with different methods for the built-in or a standalone proxy version. From there it splits up to the different services, for the window-manager to window-manager/window-manager.js WindowManagerService, ecmascript-debugger to ecma-debugger/ecma-debugger.js ECMAScriptDebuggerService, console-logger/console.js ErrorConsoleService and so one.

I have not worked much with the exec service myself, but i think it is not very well support in core 2.2, e.g. parameters for Opera actions are missing.

You can also add a debug flag to the url, like https://dragonfly.opera.com/app/?debug. Then you will get an additional menu in the top right corner from where you can open additional views. For you probably "Debug" and "Commandline Debug" would be interesting, in the former you can see the communication on the protocol layer, in the other you can submit commands directly in xml.

But be aware, STP/1 is really a new protocol.

Edit: publishing will take a bit longer, meanwhile you can get the proxy which we are using for development at https://dragonfly.opera.com/app/dragonkeeper/

Post edited Friday, 2. October 2009, 12:11:20

By deniz O anchor Friday, 2. October 2009, 12:53:00

avatarHi,

I am the developer behind our watir/webdriver implementation. As Chris mentioned, the protocol has been under heavy development and we don't have a public build for the latest improvements. webdriver is/was mainly java but it also has a python implementation you can take as reference:

http://code.google.com/p/webdriver/

I will release the tools once the next version of Opera is out. Opera 10 doesn't have the features we've added for automation, but will have it in the next version. I am sorry but I can't give a time frame just yet.

By DanielHendrycks anchor Friday, 2. October 2009, 23:29:24

avatar

Originally posted by deniz:

Opera 10 doesn't have the features we've added for automation, but will have it in the next version.


Meaning 10.1 or the next major release which is 10.5?

By deniz O anchor Tuesday, 6. October 2009, 14:18:20

avatarThe features will be enabled in the next major release.

Post edited Monday, 26. October 2009, 19:10:30

Moderators: pepelsbey | dstorey | operadev | chrismills | shwetankdixit | brucelawson | iheni | andreasbovens | zibin | mollydotcom