GNOME Bugzilla – Bug 683182
Broken hyperlink methods
Last modified: 2012-09-04 21:13:26 UTC
Steps to reproduce: 1. Launch a Gecko or WebKitGtk browser via a terminal 2. Use pyatspi to perform the following on a link (I used the fedora start page and accerciser's ipython console; adjust accordingly if you are not.) did: link = acc.queryHyperlink() result: <Hyperlink object at 0x3322dc0 (AtspiHyperlink at 0x19c48c0)> did: link.getURI(0) result: 'http://fedoraproject.org/en/get-fedora' did: link.get_n_anchors result: <bound method Hyperlink.get_n_anchors of <Hyperlink object at 0x3322dc0 (AtspiHyperlink at 0x19c48c0)>> So far so good. But then actually trying to use that method fails with a GError in the pyatspi environment and the following error in the terminal from which the browser was started: ** (firefox:12904): CRITICAL **: impl_get_NAnchors: assertion `ATK_IS_HYPERLINK (link)' failed I do not understand why the ATK_IS_HYPERLINK test is failing here. Not sure if it is in the bridge or ATK. But it's not unique to the toolkit being accessed. And I sure don't recall this happening before.
I've just fixed this (at-spi2-atk commit 925892). The bridge is passing a D-Bus object path corresponding to the AtkObject with the hyperlink. Most of the hyperlink functions were using an internal function to get the hyperlink from the Atk object when needed, but impl_GetURI was not using this, instead trying to cast directly to a hyperlink.