- Pilot_RiazRegular Participant
- Posts : 27
Join date : 2011-08-24
Using Xpath how do i locate the correct cell from a table
Fri Sep 28, 2012 9:29 pm
Hi,
There is a table on the webpage with columns and rows. Each cell in the table is a clickable link. The value in the cell is number, total no. of users
This number will change as the user count increases or decreases.
When i inspect the element with firebug the code returned is:
a href="/form/candidate-list.aspx?statusId=1&formid=219&companyid=1618" title="Click to view the completing applications candidate list" class="querystringSearch" onclick="s_objectID="4888_1";return this.s_oc?this.s_oc(e):true">4888
Full code snippet below if this helps
table id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_DXMainTable" class="dxgvTable" cellspacing="0" cellpadding="0" border="0" style="width:100%;border-collapse:collapse;empty-cells:show;">
tbody>
tr id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_DXHeadersRow">
tr class="dxgvFilterRow">
tr id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_DXDataRow0" class="dxgvDataRow">
tr id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_DXDataRow1" class="dxgvDataRow">
td id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_tccell1_0" class="aspx-gridview-cell dxgv" style="border-bottom-width:0px;">
td id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_tccell1_1" class="aspx-gridview-cell dxgv" align="center" style="border-bottom-width:0px;"> 16/12/2011 00:00:00 /td
td id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_tccell1_2" class="aspx-gridview-cell dxgv" align="center" style="border-bottom-width:0px;"> 01/09/2013 00:00:00 /td
td id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_tccell1_3" class="aspx-gridview-cell dxgv" align="center" style="border-bottom-width:0px;">
0
/td
There is a table on the webpage with columns and rows. Each cell in the table is a clickable link. The value in the cell is number, total no. of users
This number will change as the user count increases or decreases.
When i inspect the element with firebug the code returned is:
a href="/form/candidate-list.aspx?statusId=1&formid=219&companyid=1618" title="Click to view the completing applications candidate list" class="querystringSearch" onclick="s_objectID="4888_1";return this.s_oc?this.s_oc(e):true">4888
Full code snippet below if this helps
table id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_DXMainTable" class="dxgvTable" cellspacing="0" cellpadding="0" border="0" style="width:100%;border-collapse:collapse;empty-cells:show;">
tbody>
tr id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_DXHeadersRow">
tr class="dxgvFilterRow">
tr id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_DXDataRow0" class="dxgvDataRow">
tr id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_DXDataRow1" class="dxgvDataRow">
td id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_tccell1_0" class="aspx-gridview-cell dxgv" style="border-bottom-width:0px;">
td id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_tccell1_1" class="aspx-gridview-cell dxgv" align="center" style="border-bottom-width:0px;"> 16/12/2011 00:00:00 /td
td id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_tccell1_2" class="aspx-gridview-cell dxgv" align="center" style="border-bottom-width:0px;"> 01/09/2013 00:00:00 /td
td id="ctl00_uxContentPlaceHolderContent_uxSchedulesListTab_uxLiveVacancyASPxGridView_tccell1_3" class="aspx-gridview-cell dxgv" align="center" style="border-bottom-width:0px;">
0
/td
- Pilot_RiazRegular Participant
- Posts : 27
Join date : 2011-08-24
Re: Using Xpath how do i locate the correct cell from a table
Mon Oct 01, 2012 8:59 pm
I know now the value i want is in a table, the cell is in 4th row, 4th column
Using Xpath how do i locate the cell in the 4th row, 4th column?
Using Xpath how do i locate the cell in the 4th row, 4th column?
- sharathRegular Participant
- Posts : 29
Join date : 2012-08-04
Re: Using Xpath how do i locate the correct cell from a table
Wed Oct 03, 2012 11:10 am
Hi Riaz,
You can use add on, "Xpath checker" to get the xpath of the cell.
Thanks,
Sharath
You can use add on, "Xpath checker" to get the xpath of the cell.
Thanks,
Sharath
- Pilot_RiazRegular Participant
- Posts : 27
Join date : 2011-08-24
Re: Using Xpath how do i locate the correct cell from a table
Thu Oct 04, 2012 8:44 pm
Thanks very much
- how to locate an anchor tag which resides in a table cell
- how to get cell data from table on webpage
- How to pass XPATH as an argument in Robot class to locate an element
- How do i get the ID or Xpath of Text from Dynamic table?
- How Xpaths works in Selenium and What is the difference between native Xpath and absolute xpath and relative xpath.
Permissions in this forum:
You cannot reply to topics in this forum