Re: [wtr-general] It doesn't work when clicking a button in Updatepanel

2011-06-22 Thread Ashok Tulachan
Hi Green,

It might not have clicked because you might have some other button with the
same id. Seems like your id name sounds like a class name as most of the id
name have some no on it so we gonna have to use some regular expressions.

Try with the id and the regular expressions and let me know.

browser.button(:id, /id-name/).click

Hope that helps.

Ashok




On Wed, Jun 22, 2011 at 2:13 AM, Ankur Gera  wrote:

> Hi Green,
>
>  Are your sure that after clicking "btnAdd" button manually you go to the
> next page?
>
> Thanks & Regards,
> Ankur Gera
>
>
> On Mon, Jun 20, 2011 at 6:08 AM, Green Yin  wrote:
>
>> My web application uses the updatepanel control. See my watir scripts:
>> {
>>
>> ie = Watir::IE.start(url)
>> ie.text_field(:id, "txtLogin").set("XXX")
>> ie.text_field(:id, "txtPassword").set("xxx")
>> # Without using updatepanel
>> ie.button(:id, "btnLogin").click
>>
>> # Using updatepanel
>> ie.button(:id, "btnAdd").click
>> }
>>
>> It's no problem when clicking "Login" button, the page will go to the
>> next page. After clicking "btnAdd" button, the page just refresh
>> without going to next page. I was tried to use id, name and value of
>> the button to click it, but it's the same result.
>>
>> Does anyone met the problem? Thanks!
>>
>> --
>> Before posting, please read http://watir.com/support. In short: search
>> before you ask, be nice.
>>
>> watir-general@googlegroups.com
>> http://groups.google.com/group/watir-general
>> watir-general+unsubscr...@googlegroups.com
>>
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>



-- 
Regards,

Ashok Tulachan

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] It doesn't work when clicking a button in Updatepanel

2011-06-22 Thread Ankur Gera
Hi Green,

 Are your sure that after clicking "btnAdd" button manually you go to the
next page?

Thanks & Regards,
Ankur Gera

On Mon, Jun 20, 2011 at 6:08 AM, Green Yin  wrote:

> My web application uses the updatepanel control. See my watir scripts:
> {
>
> ie = Watir::IE.start(url)
> ie.text_field(:id, "txtLogin").set("XXX")
> ie.text_field(:id, "txtPassword").set("xxx")
> # Without using updatepanel
> ie.button(:id, "btnLogin").click
>
> # Using updatepanel
> ie.button(:id, "btnAdd").click
> }
>
> It's no problem when clicking "Login" button, the page will go to the
> next page. After clicking "btnAdd" button, the page just refresh
> without going to next page. I was tried to use id, name and value of
> the button to click it, but it's the same result.
>
> Does anyone met the problem? Thanks!
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] It doesn't work when clicking a button in Updatepanel

2011-06-20 Thread Green Yin
My web application uses the updatepanel control. See my watir scripts:
{

ie = Watir::IE.start(url)
ie.text_field(:id, "txtLogin").set("XXX")
ie.text_field(:id, "txtPassword").set("xxx")
# Without using updatepanel
ie.button(:id, "btnLogin").click

# Using updatepanel
ie.button(:id, "btnAdd").click
}

It's no problem when clicking "Login" button, the page will go to the
next page. After clicking "btnAdd" button, the page just refresh
without going to next page. I was tried to use id, name and value of
the button to click it, but it's the same result.

Does anyone met the problem? Thanks!

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com