[wtr-general] Re: Ruby Watir to get specific html element of a page

2015-02-20 Thread Nice Faith
i try this one: puts @browser.execute_script <<-JS var link = document.getElementById('street') return link.innerHTML JS .. there's no error but then there's no display... On Tuesday, February 17, 2015 at 2:31:04 PM UTC+8, Nice Faith wrote: > > Hai G

[wtr-general] Re: Ruby Watir to get specific html element of a page

2015-02-20 Thread Nice Faith
27; for nil:NilClass excel.rb:275:in `test_login' but if I use puts @browser.execute_script('return document.getElementsByClassName("sample_class")[0]').html it works.. it display the html tags... On Tuesday, February 17, 2015 at 2:31:04 PM UTC+8, Nice Faith wrote: > >

[wtr-general] Re: Ruby Watir to get specific html element of a page

2015-02-17 Thread Nice Faith
c:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:290:in `outer_html' excel.rb:277:in `test_login' 1 tests, 0 assertions, 0 failures, 1 errors, 0 skips It diplays "street exist"...so the problem there is on displaying th

[wtr-general] Re: Ruby Watir to get specific html element of a page

2015-02-17 Thread Nice Faith
Ahmf. the web element is present..But when I try to print/put it it doesn't work. On Tuesday, February 17, 2015 at 2:31:04 PM UTC+8, Nice Faith wrote: > > Hai Guys. I am just trying to explore or learn Watir. > I have already try this one: > > puts browser.text >

[wtr-general] Re: Ruby Watir to get specific html element of a page

2015-02-16 Thread Nice Faith
Ahmm. Iately, I try what you have suggested. But then, it doesn't work. There's no error but it was not displayed On Tuesday, February 17, 2015 at 2:31:04 PM UTC+8, Nice Faith wrote: > > Hai Guys. I am just trying to explore or learn Watir. > I have already try thi

[wtr-general] Ruby Watir to get specific html element of a page

2015-02-16 Thread Nice Faith
Hai Guys. I am just trying to explore or learn Watir. I have already try this one: puts browser.text and it works. I would like to ask if it is possible to display or print only the specific element or html tags. For example this one: Add New User Is there any way to get this element onl

[wtr-general] Re: How to display content of text file in the browser using watir?

2015-02-16 Thread Nice Faith
In connection to her question, is there a way for me to display outputs from Watir to a browser? On Wednesday, February 11, 2015 at 9:29:18 AM UTC+8, Ping-0t wrote: > > Dear All, > > I am trying to save the results of my test in the log_file.txt and I want > it to display in the browser. Is it p