I think you mean $ie and not ie$. The spaces thing is a good point, also
you need to pay attention to case as well.
On Wednesday, January 16, 2013 3:05:11 PM UTC-5, Super Kevy wrote:
>
> You stated "but i didn't helped the output is " *No examples found." only"
> *
> Did you get the puts message in your if clause?.
>
> Do an inspect on the Ok button to assure the span text is Ok I've got
> developers who add spaces at times due to operator finger issues.
> Try including a include? in your code stream to verify things are
> displaying.
>
> puts 'POPUP displayed: ' + ie$.text.include?('Urgent Message').to_s
> *
> *
> *
> *
> On Tuesday, January 15, 2013 12:08:30 PM UTC-6, Deepak Kumar wrote:
>>
>> I tried the code wwith the changes made by you
>>
>> i also try to just verify the presence of the span by changing just a bit
>> of your code
>>
>> $ie= Watir::IE.new
>> $ie.goto("https://q2pdc2w4.edc.cingular.net:9300/v2/Login.html")
>> $ie.text_field(:id,"Userid").set("Pos3nbi")
>> $ie.text_field(:id,"Password").set("unix11a")
>> $ie.select_list(:id,"market").select("Dallas")
>> $ie.image(:id,"Submit").click
>> if $ie.span(:text=>'Ok').present?
>> puts "Present"
>> #$ie.span(:text=>'Ok').click
>> else
>> puts "Not Present"
>> end
>>
>> but i did'nt helped the output is " *No examples found." only*
>>
>>
>> On Tue, Jan 15, 2013 at 10:47 PM, Joe Fl <[email protected]> wrote:
>>
>>> Deepak,
>>>
>>>
>>> $ie= Watir::IE.new
>>> $ie.goto("https://q2pdc2w4.**edc.cingular.net:9300/v2/**Login.html<https://q2pdc2w4.edc.cingular.net:9300/v2/Login.html>
>>> ")
>>> $ie.text_field(:id,"Userid").**set("Pos3nbi")
>>> $ie.text_field(:id,"Password")**.set("unix11a")
>>> $ie.select_list(:id,"market").**select("Dallas")
>>> $ie.image(:id,"Submit").click
>>> if $ie.span(:text=>'Ok').present?
>>> $ie.span(:text=>'Ok').click
>>> else
>>> puts "Not Present"
>>> end
>>>
>>> I change it from button to span and added the if .present? Try this and
>>> let me know the outcome.
>>>
>>> Joe
>>>
>>>
>>> On Tuesday, January 15, 2013 12:12:32 PM UTC-5, Deepak Kumar wrote:
>>>>
>>>> require "watir"
>>>>
>>>> $ie= Watir::IE.new
>>>> $ie.goto("https://q2pdc2w4.**edc.cingular.net:9300/v2/**Login.html<https://q2pdc2w4.edc.cingular.net:9300/v2/Login.html>
>>>> ")
>>>> $ie.text_field(:id,"Userid").**set("Pos3nbi")
>>>> $ie.text_field(:id,"Password")**.set("unix11a")
>>>> $ie.select_list(:id,"market").**select("Dallas")
>>>> $ie.image(:id,"Submit").click
>>>> $ie.button(:text=>'Ok').click
>>>>
>>>> On Tuesday, January 15, 2013 10:20:57 PM UTC+5:30, Deepak Kumar wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> following is the HTML code
>>>>>
>>>>> *<div class="ui-dialog-buttonpane ui-widget-content
>>>>> ui-helper-clearfix">*
>>>>> *<button type="button" class="ui-button ui-widget ui-state-default
>>>>> ui-corner-all ui-button-text-only" role="button" aria-disabled="false">
>>>>> *
>>>>> *<span class="ui-button-text">Ok</span></button></div>*
>>>>>
>>>>> How i can click the span.
>>>>> I used the following code.but it did'nt helped :(
>>>>>
>>>>> *$ie.div(:class , "ui-dialog-buttonpane ui-widget-content
>>>>> ui-helper-clearfix").button(:class,"ui-button ui-widget
>>>>> ui-state-default ui-corner-all ui-button-text-only").span(:
>>>>> class,"ui-button-text").click*
>>>>>
>>>>> I am getting the following error
>>>>>
>>>>> *Unable to locate element, using {:class=>"ui-dialog-buttonpane
>>>>> ui-widget-content ui-helper-clearfix", :tag_name=>["div"]}*
>>>>>
>>>>> --
>>> Before posting, please read http://watir.com/support. In short: search
>>> before you ask, be nice.
>>>
>>> [email protected]
>>> http://groups.google.com/group/watir-general
>>> [email protected]
>>>
>>
>>
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]