18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

SAHI is not recognizing a click on browser.

SreekanthSreekanth Members
edited March 2013 in Sahi - Open Source
Hello All,

I have a problem that SAHI is not recognizing a click on browser, its recording the click. But when played back, sahi says “undefined”. This click is not on a button.
I am using Firefox 18.0.2. Tried this in Windows 8 and windows 7. Sahi version is V3.5 Build: 2011-07-19.

Here is an image of the event.
http://s11.postimage.org/sowdtk4n7/sahi.jpg

When recording clicks on the page, it’s creating these scripts.
_click(_cell("Bitte die Daten in den Mandanteneinstellungen ausfüllen"));
_click(_cell("Beleg bearbeiten"));
_click(_cell("Beleg bearbeiten"));
_click(_cell("Beleg löschen"));

I have taken the properties of clickable area of a link. Can someone help me on this ?

hasAttached=true;
style={{[object CSS2Properties]}};
style=[object CSS2Properties];
colSpan=1;
rowSpan=1;
dataset={{[object DOMStringMap]}};
dataset=[object DOMStringMap];
properties={{[object HTMLPropertiesCollection]}};
properties=[object HTMLPropertiesCollection];
tabIndex=-1;
accessKeyLabel=Alt+Shift+;
contentEditable=inherit;
innerHTML=

<font onclick="deleteTransport();" name="b3" style="font-family:arial,helvetica,sans-serif; font-size:12px; this.style.cursor='hand';">Sendung löschen</font>

;
outerHTML=<td style="cursor: pointer; background: url("/skins/green/tab_b.jpg") repeat scroll 0% 0% transparent;" onmouseover="bgr_color(this, '/skins/green/tab_c.jpg')" onmouseout="bgr_color(this, '/skins/green/tab_b.jpg')" align="left" valign="middle">

<font onclick="deleteTransport();" name="b3" style="font-family:arial,helvetica,sans-serif; font-size:12px; this.style.cursor='hand';">Sendung löschen</font>

</td>;
offsetParent={{[object HTMLTableElement]}};
offsetParent=[object HTMLTableElement];
offsetTop=146;
offsetLeft=2;
offsetWidth=335;
offsetHeight=27;
tagName=TD;
scrollHeight=27;
scrollWidth=335;
clientHeight=27;
clientWidth=335;
firstElementChild={{[object HTMLFontElement]}};
firstElementChild=[object HTMLFontElement];
lastElementChild={{[object HTMLFontElement]}};
lastElementChild=[object HTMLFontElement];
childElementCount=1;
children={{[object HTMLCollection]}};
children=[object HTMLCollection];
classList={{}};
classList=;
nodeName=TD;
nodeType=1;
parentNode=[object HTMLTableRowElement];
parentElement=[object HTMLTableRowElement];
childNodes={{[object NodeList]}};
childNodes=[object NodeList];
firstChild={{[object Text]}};
firstChild=[object Text];
lastChild={{[object Text]}};
lastChild=[object Text];
previousSibling={{[object Text]}};
previousSibling=[object Text];
nextSibling={{[object Text]}};
nextSibling=[object Text];
attributes={{[object NamedNodeMap]}};
attributes=[object NamedNodeMap];
ownerDocument={{[object HTMLDocument]}};
ownerDocument=[object HTMLDocument];
namespaceURI=http://www.w3.org/1999/xhtml;
localName=td;
baseURI=http://11.100.102.49:8080/parcel.atlas?doAction=deliveryAction&fromSendungsbildung=Yes;
textContent=

Sendung löschen

;
ELEMENT_NODE=1;
ATTRIBUTE_NODE=2;
TEXT_NODE=3;
CDATA_SECTION_NODE=4;
ENTITY_REFERENCE_NODE=5;
ENTITY_NODE=6;
PROCESSING_INSTRUCTION_NODE=7;
COMMENT_NODE=8;
DOCUMENT_NODE=9;
DOCUMENT_TYPE_NODE=10;
DOCUMENT_FRAGMENT_NODE=11;
NOTATION_NODE=12;
DOCUMENT_POSITION_DISCONNECTED=1;
DOCUMENT_POSITION_PRECEDING=2;
DOCUMENT_POSITION_FOLLOWING=4;
DOCUMENT_POSITION_CONTAINS=8;
DOCUMENT_POSITION_CONTAINED_BY=16;
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;
itemType={{}};
itemType=;
itemProp={{}};
itemProp=;
itemRef={{}};
itemRef=;
align=left;
vAlign=middle;

Functions

querySelector
querySelectorAll
addEventListener
removeEventListener
dispatchEvent
click
focus
removeAttributeNS
removeAttribute
getAttribute
getElementsByTagName
setAttribute
getElementsByTagNameNS
hasAttributeNS
setAttributeNS
hasAttribute
getAttributeNS
getElementsByClassName
getClientRects
getBoundingClientRect
setCapture
releaseCapture
mozMatchesSelector
insertBefore
replaceChild
removeChild
appendChild
hasChildNodes
cloneNode
normalize
isSupported
hasAttributes
compareDocumentPosition
lookupPrefix
isDefaultNamespace
lookupNamespaceURI
isEqualNode
setUserData
getUserData
contains
getAttributeNode
setAttributeNode
removeAttributeNode
getAttributeNodeNS
setAttributeNodeNS
mozRequestFullScreen
mozRequestPointerLock
blur
insertAdjacentHTML
scrollIntoView
onmouseout
onmouseover


Regards,
Sreekanth.

Best Answer

  • Answer ✓
    got it working. used following.
    _cell("Beleg bearbeiten").children[0].click()

Answers

Sign In or Register to comment.