Archive for Web2.0

Selenium and the Permission denied to get property Location.href problem

SeleniumI came across a strange behaviour of Selenium and wanted to share my pain with someone really. But first couple of words of introduction. I use Selenium in my current webapp project which I am working on. The application uses quite a lot of javascript (Dojo framework mostly) which can be tested using D.O.H. framework but the Selenium is giving us the final sanity checks, acts as integration test framework and may be used by product owner in an agile environment to drive acceptance on user stories via automated acceptance tests.

Selenium is an excellent package. I really love it. Just to mention integration with various browsers, Selenium IDE, support for integration with build (Selenese ant task) and really easy way of creating and storing the tests as HTML. It is a framework which cannot be ignored by anyone working on webinterfaces.

There is previously mentioned selenese ant task which helps with integration of the Selenium tests and an ant build. You can grab the jar from the Selenium RC distribution.

However as most of the things around us it is not a perfect software. Anyone had the famous “Permission denied to get property Location.href”? Cross domain scripting issues?
In my case I figure out two reasons for above problem and I wanted to share it:

Problem 1:

Let’s look at the following selenium command:

  • open
  • http://host/some/url

Looks good, doesn’t it? So it might work, but it can as well break on another box with the “Permission denied to get property” and some other scary warnings. The solution in this case was simply to remove the host definition from url leaving just:

  • open
  • /some/url

Problem 2:

One of the pages I was testing had redirection in case of the authorization violation. So esentially after single HTTP request the browser was receiving single response with redirection and then performed another request to the URL defined in the redirection. Selenium couldn’t handle that correctly. But again, it wasn’t deterministic, it could work on one box but fail on another. Timing issues etc. Hate that. Neither of the combinations worked in consistent way: openAndWait, open + pause.

The solution in this case required change in the webapp to remove usage of the redirection (which I believe was an ugly way of dealing with the problem anyway).

Hope it will help someone with similar issues. If you know another tricks or something to avoid when using Selenium please contact me or leave a comment here.

Popularity: 65% [?]

Comments (4)

Are you a self-searcher?

If you google yourself often then don’t be ashamed. It is not a sign of your vanity or being an egocentric. If you do it regularly it means that you are in the top 3% of internet users. Users who care what The Web knows about them. Conscious, sane and sensible users.

As Pew Internet and American Life Project says in their report about the online identity management and search in the age of transparency more and more people are aware of their publicly available digital footprint. 47% have searched for information about themselves online, up from just 22% five years ago. There are as well interesting finding about our opinion about the amount of information about us available online, need for self-promoting online, transparency in the social networks and how many of us used search engines to follow others’ digital footprints.

So, if you can find time have a look at full report (PDF), it is really interesting.

Ok, enough for now. It is almost Christmas, isn’t it? I would like to take this opportunity and wish all of you Merry Christmas and Happy New Year!

Popularity: 35% [?]

Comments (1)

Report about social networks

If social networks and community pages don’t mean just fun for you and you are interested in understanding mechanics of business models for those services then you might be interested in a raport about social services published by FaberNovel. This report consist of three parts:

  • general rules of social networks
  • case studies of matchmaking services Meetic and Match.com
  • case studies of business networks Xing and LinkedIn

The authors of the report grouped all web 2.0 services into four groups:

  • online communities - which main focus is on “socializing”
  • business networks - with focus on career and business opportunities
  • online matchmaking - dating services
  • alumni networks - helping to stay in touch with friends from school or university

Even if it looks that there should be much more types of services this hierarchy seems to cover most of cases missing maybe only some specializations of those types.

Report in PDF to download here.

Popularity: 20% [?]

Comments

Flickrfs - because the Flickr Uploader sux

FlickrI can recall a conversation with psd from early this year about why I think current way of uploading photos to flickr sux big time. I treat flickr as repository and backup of _all_ my photos (12525 photos at the moment, still growing) and not just as a photo blog. It means that very often I have to upload quite a lot of them in batches. The existing solutions just make me angry (how shabby is the standard Flickr Uploadr!) when I have to tag them and correctly name or create sets. I am not (yet) a mac user. Maybe there is something more user friendly, I hope.

So… Coming back to the conversation with psd I have told him that unless there is some clever integration with OS which will make the process of uploading more smooth it will be always the pain. I expected as well a bit more metadata to be populated by camera automatically. How cool would be to have GPS and geo-tag all the photos when taking them. That’s not the end. I would expect as well to be able to define some tags in a camera.

That would solve a bit problem with tags. The other problems are setting permissions, creating sets etc. For pretty long time I couldn’t find any tool which I liked. Lately after migrating all my home computers to Gutsy I found something called Flickrfs as an available package. It is a virtual filesystem which mounts a flickr account as any other data file storage. It synchronizes the flickr account with local filesystem and shows photos as images files with all metadata represented as text files.

Imagine that. You can upload photos to flickr just by using cp command, the same applies to downloading photos (even if Flickr itself makes it as hard as possible to get back of your own photos). Deleting is as easy as invoking rm. You can set permissions using standard chmod command and define sets by creating symlinks with ln.

I like the idea itself very much. The Flickrfs is created and maintained mainly by one person so there might be some small “bugletes” but I still support this project and wish it the best. Well done Manish Rai Jain!

Popularity: 28% [?]

Comments

OpenSocial API

GoogleLooks like I am writing only about Google but it is just because they produce pretty interesting stuff. This time Google created a new API which will help you to create apps which can run on any social network which uses this API. Sounds like Facebook? The API will consist of three groups: People, Storage and Activities. So, watch tomorrow http://code.google.com/apis/opensocial (documentation) and http://sandbox.orkut.com (sandbox).

Popularity: 21% [?]

Comments (2)

Telephony Mashups

Programmable WebProgrammable Web announced today a new feature at their site: markets which give a vertical segmentation of web APIs and mashups with three initial markets: mapping, shopping and what is the most interesting for me: telephony. There is as well an article describing current state of Telephony & Mobile APIs and Mashups. The telephony mashup sector is very dynamic and I believe will keep progressing. Converging information about user location, presence with data from the Web plus communication capabilities (APIs for voice call, conference call, messaging) will result with very interesting mashups. Some of them will be cool. Some of them will be cool and very successful. What it might be? Hmmm… You tell me. I can just give you some examples. Have a look at the finalist list of the O’Reilly ETel 2007 Mashup Contest to get a feeling what is possible to build. I was working couple of months ago on Treehouse Mashups using Web21c SDK (BTW it was a mashup of the day at Programmable Web). It could be a good example as well. So… What would you build?

Popularity: 32% [?]

Comments

Google Mashup Editor

Google Mashup EditorI just got an invitation to try Google Mashup Editor (GME) which is a new AJAX development framework from Google with a web based IDE where you can edit, compile and test your mashups. In opposition to Yahoo Pipes the solution from Google doesn’t give you a slick visual editor where you can do any transformation of a RSS feed just by dragging and dropping. In this case you will have to type something. You don’t like it? I do. There is an example which displays an RSS feed:

<gm:page title="Mashup">

  <h1>Hello World!</h1>

  <gm:list id="diggFeed" data="http://www.digg.com/rss/index.xml" pagesize="10" template="diggTemplate"/>

  <gm:template id="diggTemplate">
    <table>
      <tr repeat="true">
        <td><gm:text ref="atom:title"/></td>
        <td><gm:text ref="digg:diggCount"/></td>
      </tr>
    </table>
  </gm:template>

</gm:page>

So, the editor accepts mixture of standard HTML, CSS, Javascript with Google Mashup tags. When you compile your application for testing and publishing, all the GME tags are transformed into JavaScript. An application can be tested in their sandbox. Ready application is hosted on Google servers and can be trivially transformed into iGoogle gadget. What is very interesting is an eventing model that allows you to emit events in one module that are handled in another module. It is fairly easy to create a map mashups and there is support for geo rss as well. To check what is possible to build using GME visit GME Mashup Gallery. There is also an official blog about GME. Niiiiiice!

Popularity: 29% [?]

Comments

Close
E-mail It