[wtr-general] How to access element in a table ?
down vote favorite Hi everyone, I'm current writing a test script for our MLS( Multiple Listing System ) systems. The website is mainly written in C# .NET. Here is the screenshot that I got: http://i235.photobucket.com/albums/ee62/rox_rook/Ex-1.gif And this is the HTML source: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML Transitional//ENMETA http- equiv=Content-Type content=text/html; charset=utf-8 HTML sizcache=33 sizset=1BODY style=POSITION: relative ! important; OVERFLOW-X: hidden scroll=no xmlns:ignav=http:// schemas.infragistics.com/ASPNET/WebControls/WebMenu sizcache=33 sizset=1FORM id=Form1 method=post name=Form1 action=Menu.aspx?hidMLS=SDNA sizcache=33 sizset=1DIV id=divControlPanel class=ControlPanel sizcache=33 sizset=1DIV id=divMenu class=Menu sizcache=33 sizset=1DIV id=divNavigation class=Navigation sizcache=33 sizset=1DIV id=divNavContainer class=MenuWrapper TABLE style=BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER- BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; CURSOR: default id=uwmMainMenu_MainM onmouseup=javascript:igmenu_mouseup(this, event); onselectstart=javascript:igmenu_selectStart(); class=WebMenu onmouseover=javascript:igmenu_mouseover(this, event); onmouseout=javascript:igmenu_mouseout(this, event); onmousedown=javascript:igmenu_mousedown(this, event); border=0 cellSpacing=1 cellPadding=2 igLevel=0 submenu=1 TBODY TR TD accessKey=S onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_1 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_1M igHov=IGMenuItemHover igTag=1 igClass=IGMenuItem US/Uearches /TD TD accessKey=L onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_2 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_2M igHov=IGMenuItemHover igTag=2 igClass=IGMenuItem UL/Uistings /TD TD accessKey=T onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_3 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igHov=IGMenuItemHover igTag=26 igFrame=_Script igUrl=menuOneLevelItemClick('http://realist2.firstamres.com/ propertylink? UserID=rapstaffAgentLastName=StaffAgentFirstName=RapattoniCustomerGroupName=Sedona Verde ValleyUserPW=sedona','_Realist') igClass=IGMenuItem UT/Uax /TD TD accessKey=R onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_4 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igHov=IGMenuItemHover igTag=3 igFrame=_Script igUrl=Cart_OnClick() igClass=IGMenuItem CaUr/Ut /TD TD accessKey=C onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_5 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_5M igHov=IGMenuItemHover igTag=4 igClass=IGMenuItem UC/Uontacts /TD TD accessKey=N onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_6 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_6M igHov=IGMenuItemHover igTag=5 igClass=IGMenuItem LiUn/Uks /TD TD accessKey=A onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_7 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_7M igHov=IGMenuItemHover igTag=6 igClass=IGMenuItem UA/Udmin /TD TD accessKey=H onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_8 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_8M igHov=IGMenuItemHover igTag=7 igClass=IGMenuItem UH/Uelp /TD /TR /TBODY /TABLE /DIV/DIV/DIV/DIV/FORM/BODY/HTML I tried to use TestWise Recorder on Firefox to see what actual element that I currently access, but FF does not recognize it. :( Anyone could give me a hint where I missed ? Thanks, -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] How to access element in a table ?
Hi Chan You can try and use firebug to identify element http://getfirebug.com/downloads http://getfirebug.com/downloadsBasim On Tue, Jul 27, 2010 at 3:17 PM, Chan Nguyen atbl1...@gmail.com wrote: down vote favorite Hi everyone, I'm current writing a test script for our MLS( Multiple Listing System ) systems. The website is mainly written in C# .NET. Here is the screenshot that I got: http://i235.photobucket.com/albums/ee62/rox_rook/Ex-1.gif And this is the HTML source: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML Transitional//ENMETA http- equiv=Content-Type content=text/html; charset=utf-8 HTML sizcache=33 sizset=1BODY style=POSITION: relative ! important; OVERFLOW-X: hidden scroll=no xmlns:ignav=http:// schemas.infragistics.com/ASPNET/WebControls/WebMenu sizcache=33 sizset=1FORM id=Form1 method=post name=Form1 action=Menu.aspx?hidMLS=SDNA sizcache=33 sizset=1DIV id=divControlPanel class=ControlPanel sizcache=33 sizset=1DIV id=divMenu class=Menu sizcache=33 sizset=1DIV id=divNavigation class=Navigation sizcache=33 sizset=1DIV id=divNavContainer class=MenuWrapper TABLE style=BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER- BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; CURSOR: default id=uwmMainMenu_MainM onmouseup=javascript:igmenu_mouseup(this, event); onselectstart=javascript:igmenu_selectStart(); class=WebMenu onmouseover=javascript:igmenu_mouseover(this, event); onmouseout=javascript:igmenu_mouseout(this, event); onmousedown=javascript:igmenu_mousedown(this, event); border=0 cellSpacing=1 cellPadding=2 igLevel=0 submenu=1 TBODY TR TD accessKey=S onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_1 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_1M igHov=IGMenuItemHover igTag=1 igClass=IGMenuItem US/Uearches /TD TD accessKey=L onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_2 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_2M igHov=IGMenuItemHover igTag=2 igClass=IGMenuItem UL/Uistings /TD TD accessKey=T onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_3 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igHov=IGMenuItemHover igTag=26 igFrame=_Script igUrl=menuOneLevelItemClick('http://realist2.firstamres.com/ propertylink? UserID=rapstaffAgentLastName=StaffAgentFirstName=RapattoniCustomerGroupName=Sedona Verde ValleyUserPW=sedona','_Realist') igClass=IGMenuItem UT/Uax /TD TD accessKey=R onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_4 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igHov=IGMenuItemHover igTag=3 igFrame=_Script igUrl=Cart_OnClick() igClass=IGMenuItem CaUr/Ut /TD TD accessKey=C onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_5 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_5M igHov=IGMenuItemHover igTag=4 igClass=IGMenuItem UC/Uontacts /TD TD accessKey=N onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_6 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_6M igHov=IGMenuItemHover igTag=5 igClass=IGMenuItem LiUn/Uks /TD TD accessKey=A onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_7 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_7M igHov=IGMenuItemHover igTag=6 igClass=IGMenuItem UA/Udmin /TD TD accessKey=H onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_8 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_8M igHov=IGMenuItemHover igTag=7 igClass=IGMenuItem UH/Uelp /TD /TR /TBODY /TABLE /DIV/DIV/DIV/DIV/FORM/BODY/HTML I tried to use TestWise Recorder on Firefox to see what actual element that I currently access, but FF does not recognize it. :( Anyone could give me a hint where I missed ? Thanks, -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] How to access element in a table ?
Hi Basim, Thanks a lot for your quick response. I just found out that element is actually a table. I accessed to a particular table like this : my_table = ie.table( :id, uwmMainMenu_MainM ) Next, I need to access the each element of the first row of this table, but I got stuck at this point. Could you give me a minimal example to access table? Further, I don't know how to click an option in this list? http://i235.photobucket.com/albums/ee62/rox_rook/Ex-1.gif On Tue, Jul 27, 2010 at 12:59 PM, Basim Baassiri ba...@baassiri.ca wrote: Hi Chan You can try and use firebug to identify element http://getfirebug.com/downloads http://getfirebug.com/downloadsBasim On Tue, Jul 27, 2010 at 3:17 PM, Chan Nguyen atbl1...@gmail.com wrote: down vote favorite Hi everyone, I'm current writing a test script for our MLS( Multiple Listing System ) systems. The website is mainly written in C# .NET. Here is the screenshot that I got: http://i235.photobucket.com/albums/ee62/rox_rook/Ex-1.gif And this is the HTML source: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML Transitional//ENMETA http- equiv=Content-Type content=text/html; charset=utf-8 HTML sizcache=33 sizset=1BODY style=POSITION: relative ! important; OVERFLOW-X: hidden scroll=no xmlns:ignav=http:// schemas.infragistics.com/ASPNET/WebControls/WebMenu sizcache=33 sizset=1FORM id=Form1 method=post name=Form1 action=Menu.aspx?hidMLS=SDNA sizcache=33 sizset=1DIV id=divControlPanel class=ControlPanel sizcache=33 sizset=1DIV id=divMenu class=Menu sizcache=33 sizset=1DIV id=divNavigation class=Navigation sizcache=33 sizset=1DIV id=divNavContainer class=MenuWrapper TABLE style=BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER- BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; CURSOR: default id=uwmMainMenu_MainM onmouseup=javascript:igmenu_mouseup(this, event); onselectstart=javascript:igmenu_selectStart(); class=WebMenu onmouseover=javascript:igmenu_mouseover(this, event); onmouseout=javascript:igmenu_mouseout(this, event); onmousedown=javascript:igmenu_mousedown(this, event); border=0 cellSpacing=1 cellPadding=2 igLevel=0 submenu=1 TBODY TR TD accessKey=S onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_1 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_1M igHov=IGMenuItemHover igTag=1 igClass=IGMenuItem US/Uearches /TD TD accessKey=L onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_2 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_2M igHov=IGMenuItemHover igTag=2 igClass=IGMenuItem UL/Uistings /TD TD accessKey=T onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_3 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igHov=IGMenuItemHover igTag=26 igFrame=_Script igUrl=menuOneLevelItemClick('http://realist2.firstamres.com/ propertylink? UserID=rapstaffAgentLastName=StaffAgentFirstName=RapattoniCustomerGroupName=Sedona Verde ValleyUserPW=sedona','_Realist') igClass=IGMenuItem UT/Uax /TD TD accessKey=R onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_4 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igHov=IGMenuItemHover igTag=3 igFrame=_Script igUrl=Cart_OnClick() igClass=IGMenuItem CaUr/Ut /TD TD accessKey=C onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_5 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_5M igHov=IGMenuItemHover igTag=4 igClass=IGMenuItem UC/Uontacts /TD TD accessKey=N onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_6 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_6M igHov=IGMenuItemHover igTag=5 igClass=IGMenuItem LiUn/Uks /TD TD accessKey=A onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_7 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_7M igHov=IGMenuItemHover igTag=6 igClass=IGMenuItem UA/Udmin /TD TD accessKey=H onkeydown=igmenu_kbMD(this,event); id=uwmMainMenu_8 class=IGMenuItem onfocus=igmenu_kbFocus(this,event); onkeyup=igmenu_kbNav(this,event); align=center igTop=1 igChildId=uwmMainMenu_8M igHov=IGMenuItemHover igTag=7 igClass=IGMenuItem UH/Uelp /TD /TR /TBODY /TABLE /DIV/DIV/DIV/DIV/FORM/BODY/HTML I tried to use TestWise Recorder on Firefox to see what actual element that I currently access, but FF does not recognize it. :( Anyone could give me a hint where I missed ? Thanks, -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: