Thanks Angrez for looking into it.

The html code

<div class="adv_search_box">
                                        
                                        <input type="text" onfocus="select()"  
class="adv_searchTerm"
id= "advSearchFirstSearchTerm" name="firstSearchTerm" value=""/> in
                                        
                        
                                    <select size="1" name="firstFieldName" 
id="firstFieldName">

        <option value="AllFields">
                All Fields
        </option>
        <option value="ArticleTitleAbstractKeywords">
                Article Title, Abstract, Keywords
        </option>
        <option value="Authors">
                Authors
        </option>
        <option value="ArticleTitle">

                Article Title
        </option>
        <option value="Abstract">
                Abstract
        </option>
                                        </select>


*The rubycode*

require 'watir'  # the controller
include Watir
require 'test/unit/ui/console/testrunner'
require 'test/unit/testsuite'
require 'firewatir'
include FireWatir



class Sampletest < Test::Unit::TestCase

def test_firefox

        $ie = FireWatir::Firefox.new
        $ie.goto('http://www.thelancet.com/advancedsearch')
        $ie.text_field(:name, "firstSearchTerm").set("blood")
        
        sleep 5.0
        $ie.close

end
                
        
end


*The errors*

  1) Error:
test_firefox(Sampletest):
SystemStackError: stack level too deep
    c:/apps/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.
rb:451:in `js_eval_method'
    c:/apps/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/MozillaBas
eElement.rb:991:in `enabled?'
    c:/apps/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/MozillaBas
eElement.rb:977:in `assert_enabled'
    c:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:266:in
`focus'
    c:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:267:in
`focus'
    c:/apps/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/htmlelemen
ts.rb:1339:in `set'
    watir_Sample.rb:22:in `test_firefox'

1 tests, 0 assertions, 0 failures, 1 errors

Please let me know if you need anything else.

Thanks

Arihan

On Thu, Oct 22, 2009 at 1:58 PM, Angrez Singh <ang...@gmail.com> wrote:

> Can you post the HTML and your ruby code for the same?
>
>
> On Thu, Oct 22, 2009 at 5:14 PM, arihan sinha <arihan.si...@googlemail.com
> > wrote:
>
>> Hi All,
>>
>>
>> When i am running the ruby test from eclipse , the text box in the firefox
>> is not getting recognised because of
>>
>> id="advSearchFirstSearchTerm" class="adv_searchTerm" type="text" value=""
>> name="firstSearchTerm" onfocus="select()" style="background: yellow none
>> repeat scroll 0% 0%; -moz-background-clip: -moz-initial;
>> -moz-background-origin: -moz-initial; -moz-background-inline-policy:
>> -moz-initial
>>
>> I've used all the possible methods like set/type in the text box by using
>> id/name but no result. ( The section in the red is coming automatically)
>>
>>
>> The same test is working ok if i dont run it from eclipse ( of course the
>> section in the red is not coming ). Always working ok in IE6.0/IE7.0
>>
>>
>> any solution to this
>>
>>
>>
>> Thanks
>>
>> arihan
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to