Micro Focus QTP (UFT) Forums
On click no Page Navigation - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: On click no Page Navigation (/Thread-On-click-no-Page-Navigation)



On click no Page Navigation - ravi.gajul - 11-02-2011

[color=#FFD700]Hi, When I click on a link say "Search Relationships" by the code shown below page navigation to the page the link is pointing to doesn't happen.
Code:
Browser("name:=browser").Page("Page:=Page").WebTable("html id:=_ctl0_Search").WebElement("html tag:=TD","innertext:=Search Relationships).click

The source code of the page correspoding to the link is as shown below
Code:
<TABLE class=ContextMenu id=_ctl0_Search style="DISPLAY: none" cellSpacing=0 cellPadding=0><TBODY>
<TR class=ContextMenuItemHeader style="DISPLAY: none" commandname="Header">
<TD colSpan=2></TD></TR<TR class=ContextMenuItem onmouseover="this.className = 'ContextMenuItemSelected'" onclick="opener.PopupWindow.close ();opener.location.href = '/Genesis/Search/RelationshipSearch.aspx';opener.contextMenuClick (this);" onmouseout="this.className = 'ContextMenuItem'" commandname="RelationshipSearch">
<TD class=Image><IMG height=16 src="/Genesis/Images/Search.gif" width=16 align=absMiddle></TD>
<TD class=Text noWrap>Search Relationships</TD></TR>
</TBODY></TABLE>
Any help is highly appreciated.
The element to be clicked is in the last line of source code
Code:
<TD class=Text noWrap>Search Relationships</TD></TR>



RE: Page Navigation upon clicking a web element doesn't happen - kalyani0820@gmail.com - 11-03-2011

Hi,

Did you get any error message? probably in that page, there is a frame.........jus check it and include frame in your code


RE: Page Navigation upon clicking a web element doesn't happen - ravi.gajul - 11-03-2011

No there is no frame and no error message.


RE: On click no Page Navigation - ravi.gajul - 11-06-2011

Ankur, Saket, and other techies please help!!!


RE: On click no Page Navigation - parminderdhiman84 - 11-08-2011

Hi Ravi,

As far as i know, you cannot put webelement as child of WebTable. Even if you add this webelement manually to OR, you will see that webtable is not its parent.

If you want to click any element in webtable, then you have to use childobjects method.

Regards,
Parminder


RE: On click no Page Navigation - ravi.gajul - 11-08-2011

Hi Pharminder,
Thanks for responding. I have tried using child objects as well.But that doesn't help.Any other way you can think of?
Regards,
Ravi


RE: On click no Page Navigation - parminderdhiman84 - 11-08-2011

try this:

Code:
Browser("name:=browser").Page("Page:=Page").WebElement("html tag:=TD","innertext:=Search Relationships).click

If it doesnt work then please provide Spy shot of Webelement and webtable


RE: On click no Page Navigation - ravi.gajul - 11-18-2011

[attachment=855]Pls see the screenshot


RE: On click no Page Navigation - parminderdhiman84 - 11-19-2011

Add the table in your repository and try the below line:

Code:
Browser().Page().WebTable("Search Relationships").ChildItem(<row no>,<column no>,"WebElement",0).Click

or

Code:
Browser().Page().WebTable("Search Relationships").ChildItem(<row no>,<column no>,"WebElement",1).Click

let me know if this doesn't work for you.