|
Hi there,
I have now managed to set some breakpoints in my asp code and it is going into the event handler.
Maybe my code below might be able to help you.
However, in the event handler I am calling a Response.Redirect to load another page and this page does not appear to be loading.
Does anyone know of any known issues with canoo webtest and Response.Redirect?
Thanks,
Kind regards Sophie
Sophie De Malet Roquefort
IT Department 0131 555 1100
Please let me know if this e-mail address is not the best one to use.
This e-mail is intended for the named addressee only. Its contents are private and confidential and should not be read, copied or disclosed to or by any other person. If you have received this transmission in error, please notify the sender immediately by e-mail or telephone (0131 555 1100), delete the contents of this transmission and destroy any copies made. Copyright Data Discoveries Limited. All rights reserved. No part of this communication may be reproduced without the prior written permission of Data Discoveries Limited.
Opinions, conclusions and other information in this message that do not relate to the official business of Data Discoveries Limited shall be understood as neither given nor endorsed by it. Internet e-mails are not necessarily secure. Data Discoveries Limited does not accept responsibility for changes made to this message after it was sent or viruses transmitted through this e-mail or any attachment. You should carry out your own virus checking procedure before opening any attachment to this e-mail. The e-mail and IT systems of Data Discoveries Limited are subject to random monitoring and recording by or on behalf of Data Discoveries Limited.
Thank you.
Data Discoveries Limited: Registered in Scotland with Registered Number SC157375. Registered Office: 16/1 Timber Bush Edinburgh EH6 6QH. VAT Registration Number: GB 663 8176 09. Member of the Direct Marketing Association.
----------------------- Original Message -----------------------
Cc:
Date: Mon, 11 Jul 2011 08:19:26 -0600
Subject: Re: [Webtest] (no subject)
We've had similar problems in the past couple months and have not found a solution, other than 'forcehiddeninputfield' and having to click hidden radio buttons and the like to force the result we want. We can't get the JS event to trigger. So I'm interested in the answer also. -- Lisa
On Mon, Jul 11, 2011 at 7:50 AM, Sophie De Malet Roquefort <[email protected]> wrote:
Hi there,
I am using an Ajax drop down extender control, which displays a grid when a text box is clicked.
In the rowdatabound event of the grid, I set the onclick event handler to set the selected row of the grid.
e.Row.Attributes[ "onclick"] = Page.ClientScript.GetPostBackClientHyperlink(FileGridView,
"Select$" + e.Row.RowIndex);
This is then handled by the following event handler:
protected void FileGridView_SelectedIndexChanged(object sender, EventArgs e)
{
txtFile.Text = FileGridView.SelectedRow != null ? Server.HtmlDecode(FileGridView.SelectedRow.Cells[1].Text) : "";
ProfileCommon profile = ""
if (FileGridView.SelectedRow == null) return;
profile. User.ImportId = Convert.ToInt32(FileGridView.SelectedRow.Cells[0].Text);
profile. Save();
Response.Redirect( "~/Overview.aspx");
}
The generated html from Firebug is :
<div>
<table id="ctl00_ctl00_loggedOnDropDown_importDropDown_FileGridView" class="FileGridViewClass" cellspacing="0" border="0" style=" border- color:Black;border-width:1px;border-style:Solid;border-collapse:collapse;">
<tbody>
<tr style="color:White;background-color:#F24B31;">
<tr style="background-color:#DDDDDD;" onmouseout="this.style.backgroundColor='#EEEEEE'" onmouseover="this.style.backgroundColor='#999999'" onclick="_javascript_:__doPostBack('ctl00$ctl00$loggedOnDropDown$importDropDown$FileGridView','Select$0')" >
<td>
<span id="ctl00_ctl00_loggedOnDropDown_importDropDown_FileGridView_ctl02_importName">test 2</span>
</td>
<td class="align-right">99</td>
</tr>
<tr style="background-color:#EEEEEE;" onmouseout="this.style.backgroundColor='#DDDDDD'" onmouseover="this.style.backgroundColor='#999999'" onclick=" _javascript_:__doPostBack('ctl00$ctl00$loggedOnDropDown$importDropDown$FileGridView','Select$1')">
</tbody>
</table>
</div>
To test this, I click on the grid row to try and trigger the onclick event.
<clickElement xpath="//span[contains(@id, '_importName') and contains(text(), 'test 2')]"/>
I get no errors calling the clickelement, but the onclick event does not seem to be getting called. No re-direct is occurring to reload the Overview page.
Does anyone have any ideas why this might be happening.
Kind regards Sophie
Sophie De Malet Roquefort
IT Department 0131 555 1100
Please let me know if this e-mail address is not the best one to use.
This e-mail is intended for the named addressee only. Its contents are private and confidential and should not be read, copied or disclosed to or by any other person. If you have received this transmission in error, please notify the sender immediately by e-mail or telephone (0131 555 1100), delete the contents of this transmission and destroy any copies made. Copyright Data Discoveries Limited. All rights reserved. No part of this communication may be reproduced without the prior written permission of Data Discoveries Limited.
Opinions, conclusions and other information in this message that do not relate to the official business of Data Discoveries Limited shall be understood as neither given nor endorsed by it. Internet e-mails are not necessarily secure. Data Discoveries Limited does not accept responsibility for changes made to this message after it was sent or viruses transmitted through this e-mail or any attachment. You should carry out your own virus checking procedure before opening any attachment to this e-mail. The e-mail and IT systems of Data Discoveries Limited are subject to random monitoring and recording by or on behalf of Data Discoveries Limited.
Thank you.
Data Discoveries Limited: Registered in Scotland with Registered Number SC157375. Registered Office: 16/1 Timber Bush Edinburgh EH6 6QH. VAT Registration Number: GB 663 8176 09. Member of the Direct Marketing Association.
_______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest
-- Lisa Crispin Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers and Agile Teams_ (Addison-Wesley 2009) Contributor to _Beautiful Testing_ (O'Reilly 2009) http://lisacrispin.com @lisacrispin on Twitter http://entaggle.com/lisacrispin
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
|