[wtr-general] Re: Capturing data within an xml

2009-01-07 Thread winstan

Hi Guys,

Another question for you bunch as you seem to be the most helpful out
there (have posted on the comp.lang.ruby group with no response).

I have been trying to make requests to the webserver via SOAP adapting
an example i had found on another site. Am i looking at the right
thing for what i want?

This is what i am trying to complete
1: Making requests and receiving responses from 4 different web
services (v1, v2, v3, v4)
2: v2 & v4 web services require a client certificate
3: Phase one I want to make a series of requests to different methods
and do a diff on the response and an xml saved locally to ensure the
structure hasn’t changed and if it has, what’s different.

Am I going down the right path using SOAP? As I said I have already
started using an example that I found on the net… if you care to take
a look at the issues I have been having with that please take a look
at the post on the comp.lang.ruby group I made:
http://groups.google.com.au/group/comp.lang.ruby/browse_thread/thread/ad39567636611a6a?hl=en#

Thanks again guys!


On Dec 24 2008, 4:05 am, Bret Pettichord  wrote:
> I was testing an rss feed and used Mechanize + Hpricot to do so. I got
> the url from the application using Watir and then passed it to Mechanize
> to get the page and then used Hpricot to validate it.
>
> Bret
>
>
>
> srinivas subramanian wrote:
> > Hi,
>
> > Its been quite some time, since i've started using Watir. Its awesome.
> > I've used Hpricot to test xmls. It worked out well for me. Please
> > refer:http://code.whytheluckystiff.net/hpricot/
>
> > Thanks,
> > Srinivas
>
> > On Tue, Dec 23, 2008 at 5:25 AM, winstan
> >  > <mailto:lucasdavidwinstan...@gmail.com>> wrote:
>
> >     Hi Bret,
>
> >     No i havent used Mechanize. Nor have i heard of it to be honest.
> >     Before i jump into it and start playing around with it, i would like
> >     to ask have you used it in the means in which im trying to access the
> >    xmldefined above?
>
> >     Cheers
>
> >     On Dec 23, 3:08 am, Bret Pettichord  >     <mailto:b...@pettichord.com>> wrote:
> >     > Have you considered using Mechanize instead of Watir? That's
> >     what I've
> >     > used when I've had to testXML.
>
> >     > Bret
>
> >     > winstan wrote:
> >     > > Hello Again,
>
> >     > > After playing around with rexml with some of the URL's provided in
> >     > > this thread and other sites I have found I have established
> >     that you
> >     > > are in fact correct and that rexml would be the way to go.
> >     However, I
> >     > > am still making requests and receiving responses to and from
> >     the WS
> >     > > via the UI, and as such I am in need of a little more
> >     help/advice with
> >     > > this.
>
> >     > > After making the request with specific attributes a response
> >     is served
> >     > > up from the WS and is opened in another IE window. I can
> >     attach to the
> >     > > new window with out a problem but from that point on I am
> >     unsure as to
> >     > > how to proceed with the use of rexml. Bellow is an example of some
> >     > > thing I tried but I assume because I am making the.
>
> >     > > it 'Attaching to the new window and confirming that there was
> >     a VALID
> >     > > response from the web server' do
> >     > >       @b2 = Watir::IE.attach(:url, 'http://privateurl.asmx/
> >     > > wsresponse')
> >     > >       @b2.maximize
> >     > >xml= @b2.html
> >     > >       doc = REXML::Document.new(xml)
> >     > >       WID = REXML::XPath.first(doc.root, '//WID/text()')
> >     > >       WID == (data['WIDTestField'])
>
> >     > > The reason I attempted "xml= @b2.html" is because when I view the
> >     > > source of the window that contains the response from the WS,
> >     it just
> >     > > shows theXML. Needless to say that didn't work, and I didn't
> >     really
> >     > > expect it to however I thought I would give it a shot. I then
> >     went to
> >     > > irb on the command line and had a look at what "@b2.html" actually
> >     > > looked like. I was expecting to see thexmlwithout formatting
> >     however
> >     > > there was a lot more to it than what the page source showed. This
> >     > > would explain the error message in my respe

[wtr-general] Re: Capturing data within an xml

2008-12-22 Thread winstan

Hi Bret,

No i havent used Mechanize. Nor have i heard of it to be honest.
Before i jump into it and start playing around with it, i would like
to ask have you used it in the means in which im trying to access the
xml defined above?

Cheers

On Dec 23, 3:08 am, Bret Pettichord  wrote:
> Have you considered using Mechanize instead of Watir? That's what I've
> used when I've had to test XML.
>
> Bret
>
>
>
> winstan wrote:
> > Hello Again,
>
> > After playing around with rexml with some of the URL’s provided in
> > this thread and other sites I have found I have established that you
> > are in fact correct and that rexml would be the way to go. However, I
> > am still making requests and receiving responses to and from the WS
> > via the UI, and as such I am in need of a little more help/advice with
> > this.
>
> > After making the request with specific attributes a response is served
> > up from the WS and is opened in another IE window. I can attach to the
> > new window with out a problem but from that point on I am unsure as to
> > how to proceed with the use of rexml. Bellow is an example of some
> > thing I tried but I assume because I am making the.
>
> > it 'Attaching to the new window and confirming that there was a VALID
> > response from the web server' do
> >       @b2 = Watir::IE.attach(:url, ‘http://privateurl.asmx/
> > wsresponse')
> >       @b2.maximize
> > xml = @b2.html
> >       doc = REXML::Document.new(xml)
> >       WID = REXML::XPath.first(doc.root, '//WID/text()')
> >       WID == (data['WIDTestField'])
>
> > The reason I attempted “xml = @b2.html” is because when I view the
> > source of the window that contains the response from the WS, it just
> > shows the XML. Needless to say that didn’t work, and I didn’t really
> > expect it to however I thought I would give it a shot. I then went to
> > irb on the command line and had a look at what �...@b2.html” actually
> > looked like. I was expecting to see the xml without formatting however
> > there was a lot more to it than what the page source showed. This
> > would explain the error message in my respec results.html:
>
> > # > Line:
> > Position:
> > Last 80 unconsumed characters:
> >   </ > class=t>Client>
> > c:/ruby/lib/ruby/1.8/rexml/parsers/baseparser.rb:345:in `pull'
> > c:/ruby/lib/ruby/1.8/rexml/parsers/treeparser.rb:21:in `parse'
> > c:/ruby/lib/ruby/1.8/rexml/document.rb:204:in `build'
> > c:/ruby/lib/ruby/1.8/rexml/document.rb:42:in `initialize'
> > ./tests/WsRequestClientByWid_test.rb:36:in `new'
> > ./tests/WsRequestClientByWid_test.rb:36
> > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/example/
> > example_methods.rb:81:in `instance_eval'
> > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/example/
> > example_methods.rb:81:in `eval_block'
> > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/example/
> > example_methods.rb:15:in `execute'
> > c:/ruby/lib/ruby/1.8/timeout.rb:48:in `timeout'
> > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/example/
> > example_methods.rb:12:in `execute'
> > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/example/
> > example_group_methods.rb:245:in `execute_examples'
> > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/example/
> > example_group_methods.rb:244:in `each'
> > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/example/
> > example_group_methods.rb:244:in `execute_examples'
> > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/example/
> > example_group_methods.rb:141:in `run'
> > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/
> > example_group_runner.rb:22:in `run'
> > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/
> > example_group_runner.rb:21:in `each'
> > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/
> > example_group_runner.rb:21:in `run'
> > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb:
> > 115:in `run_examples'
> > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/
> > command_line.rb:10:in `run'
> > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/bin/spec:4
> > c:/ruby/bin/spec:16:in `load'
> > c:/ruby/bin/spec:16
> > ...
> > missing attribute quote
> > Line:
> > Position:
> > Last 80 unconsumed characters:
> >   </ > class=t>Client
> > Line:
> > Position:
> > Last 80 unconsumed chara

[wtr-general] Re: Capturing data within an xml

2008-12-21 Thread winstan
ng if something will work
> > is to try it. In Ruby, start IRB (type irb at the command line) then
> > type your ruby code. Irb will show you the results after each line.
> > You do not need $ signs (ruby global variable) but you must certainly
> > quote your strings. However your code will not work as there is no -
> > method for a string.
>
> > Instead, you could use the sub or gsub methods:
>
> > a = "aba"
> > a.gsub 'a', 'c'
> > => "cbc"
>
> > In the simple case, it sounds like you want to use a regular
> > expression (regexp) to do pattern recognition. Results of matching are
> > stores in MatchData objects. Something like:
>
> > re = /(.*)<\pattern/>/
> > matchdata = string.match(re)
> > puts matchdata.captures
>
> > However, if you want to do more than this you would be better using
> >REXML as Richard suggested. Alternatively, use a tool designed for
> > testing XML webservices eg SOAPUI. Watir is designed for testing
> > websites.
>
> > You might want to read a ruby tutorial though to get a better idea of
> > how to use ruby.
>
> > Hope this helps.
>
> > On 4 Dec 2008, at 06:40, winstan  wrote:
>
> >> Would i be able to do some thing like this:
>
> >> $a = TESTA
> >> $b = 
> >> $c = 
> >> $d = a - b
> >> $e = d - c
>
> >> which in turn would make $e "TESTA"?
>
> >> On Dec 4, 4:55 pm, "Richard Lawrence"  wrote:
> >>> Why are you accessing the web service using Watir and IE? Will end
> >>> users of the web service access it with a browser? If not, and if
> >>> you're just using the web service to get data to use in other GUI
> >>> tests, you might find something like Net::Http andREXMLto be more
> >>> appropriate for this part of your script.
>
> >>> Richard
>
> >>> --
> >>> Richard Lawrence
> >>> Certified Scrum Coach
> >>> Founder and Principal Consultant, Humanizing Work, LLC
> >>> 303-895-7688
> >>> rich...@humanizingwork.comwww.humanizingwork.comwww.richardlawrence.info
>
> >>> On Wed, Dec 3, 2008 at 9:29 PM, winstan
> >>>  wrote:
>
> >>>> Hi all,
>
> >>>> I'm trying to capture a variety of data in an xml response from a
> >>>> web
> >>>> service, that is served up via IE and the GUI, however when I
> >>>> interrogate the data using the IE dev toolbar I notice that all the
> >>>> element properties render useless as they are all of the same nature
> >>>> and properties.
>
> >>>> Bellow is an extract from an example xml response in which I want to
> >>>> capture the given Shortname and Long name (TestA) and set them as
> >>>> variables for use later in the script when accessing another system
> >>>> and validating the data between the two GUI's.
>
> >>>> TESTA
> >>>> TestA
>
> >>>> I hope the information provided is sufficient and understandable.
>
> >>>> Thanks again- Hide quoted text -
>
> >>> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[wtr-general] Re: undefined method `length' for 4324536:Fixnum

2008-12-16 Thread winstan

Thanks John. Some thing as simple as that. Well at least i know now
for future references.

Oh and all I changed was the data in the yml file so that its quoted.
Problem solved.

Now onto rexml fun for me... im sure i will be back with questions on
that too. Thank god every one around here is so helpful.

Thanks again.


On Dec 17, 12:10 pm, John Fitisoff  wrote:
> I think you need to use a string when setting a text field. Either use to_s 
> to convert the value from fixnum to string when setting the field or use a 
> quoted value in the yml file.
>
> --- On Tue, 12/16/08, winstan  wrote:
>
>
>
> > From: winstan 
> > Subject: [wtr-general] undefined method `length' for 4324536:Fixnum
> > To: "Watir General" 
> > Date: Tuesday, December 16, 2008, 3:28 PM
> > Hi all,
>
> > In recent days i have made changes to the way i am
> > storing/using test
> > data within my testcases. Previously i was just setting a
> > cell with a
> > hard coded number within the script but found this to not
> > be the most
> > efficient method for conducting my tests. So i started to
> > use YAML.
> > Its great, it has cleaned up my scripts alot, made it
> > easier to change
> > the test data i wish to use and has forced me into
> > introducing a
> > framework, so all is good. However...
>
> > When im trying to input specific number into a text field
> > that is
> > sourced from the testdata.yml i get the error:
>
> > "undefined method `length' for
> > 4324536:Fixnum"
>
> > Has any one come across this before, if not could some one
> > indicate
> > what im doing wrong.
>
> > Here is the line of ruby code:
>
> > text_field_name_WID.set(data['WidTextField'])
>
> > Here is the line in the yml file im sourcing:
>
> > WidTextField: 4324536
>
> > Thanks again guys.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[wtr-general] undefined method `length' for 4324536:Fixnum

2008-12-16 Thread winstan

Hi all,

In recent days i have made changes to the way i am storing/using test
data within my testcases. Previously i was just setting a cell with a
hard coded number within the script but found this to not be the most
efficient method for conducting my tests. So i started to use YAML.
Its great, it has cleaned up my scripts alot, made it easier to change
the test data i wish to use and has forced me into introducing a
framework, so all is good. However...

When im trying to input specific number into a text field that is
sourced from the testdata.yml i get the error:

"undefined method `length' for 4324536:Fixnum"

Has any one come across this before, if not could some one indicate
what im doing wrong.

Here is the line of ruby code:

text_field_name_WID.set(data['WidTextField'])

Here is the line in the yml file im sourcing:

WidTextField: 4324536

Thanks again guys.

--~--~-~--~~~---~--~~
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
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?hl=en
-~--~~~~--~~--~--~---



[wtr-general] Re: Capturing data within an xml

2008-12-04 Thread winstan

Would i be able to do some thing like this:

$a = TESTA
$b = 
$c = 
$d = a - b
$e = d - c

which in turn would make $e "TESTA"?



On Dec 4, 4:55 pm, "Richard Lawrence" <[EMAIL PROTECTED]> wrote:
> Why are you accessing the web service using Watir and IE? Will end
> users of the web service access it with a browser? If not, and if
> you're just using the web service to get data to use in other GUI
> tests, you might find something like Net::Http and REXML to be more
> appropriate for this part of your script.
>
> Richard
>
> --
> Richard Lawrence
> Certified Scrum Coach
> Founder and Principal Consultant, Humanizing Work, LLC
> 303-895-7688
> [EMAIL PROTECTED]
>
>
>
> On Wed, Dec 3, 2008 at 9:29 PM, winstan <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
>
> > I'm trying to capture a variety of data in an xml response from a web
> > service, that is served up via IE and the GUI, however when I
> > interrogate the data using the IE dev toolbar I notice that all the
> > element properties render useless as they are all of the same nature
> > and properties.
>
> > Bellow is an extract from an example xml response in which I want to
> > capture the given Shortname and Long name (TestA) and set them as
> > variables for use later in the script when accessing another system
> > and validating the data between the two GUI's.
>
> > TESTA
> > TestA
>
> > I hope the information provided is sufficient and understandable.
>
> > Thanks again- Hide quoted text -
>
> - Show quoted text -

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Capturing data within an xml

2008-12-04 Thread winstan

Hi Richard,

To be quite honest with you here I am not entirely sure as to why the
business wants automation around the accessing the WS with a browser.
I’m relatively new here and have been set the task in my early days to
spike various automation tools and from what I have read and heard
ruby/watir is the way to go. So here I am.

None the less, no matter in which process I decide to go down
(retrieving the XML via the GUI or REXML) I will still need to
establish a way to identify the line from the XML I require removing
the XML tags from the line and storing the data as a variable. I have
been looking around all over the net but I'm unsure of what the words
are that I need to Google on, so I’m going around in circles.

>From my limited understanding I would assume it be possible for me to
identify the line in which I wish to set a variable to, but removing
the  &  from that line so that the variable is
just set to TESTA... am I wrong?

Thanks for your help

On Dec 4, 4:55 pm, "Richard Lawrence" <[EMAIL PROTECTED]> wrote:
> Why are you accessing the web service using Watir and IE? Will end
> users of the web service access it with a browser? If not, and if
> you're just using the web service to get data to use in other GUI
> tests, you might find something like Net::Http and REXML to be more
> appropriate for this part of your script.
>
> Richard
>
> --
> Richard Lawrence
> Certified Scrum Coach
> Founder and Principal Consultant, Humanizing Work, LLC
> 303-895-7688
> [EMAIL PROTECTED]
>
>
>
> On Wed, Dec 3, 2008 at 9:29 PM, winstan <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
>
> > I'm trying to capture a variety of data in an xml response from a web
> > service, that is served up via IE and the GUI, however when I
> > interrogate the data using the IE dev toolbar I notice that all the
> > element properties render useless as they are all of the same nature
> > and properties.
>
> > Bellow is an extract from an example xml response in which I want to
> > capture the given Shortname and Long name (TestA) and set them as
> > variables for use later in the script when accessing another system
> > and validating the data between the two GUI's.
>
> > TESTA
> > TestA
>
> > I hope the information provided is sufficient and understandable.
>
> > Thanks again- Hide quoted text -
>
> - Show quoted text -

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Capturing data within an xml

2008-12-03 Thread winstan

Hi all,

I’m trying to capture a variety of data in an xml response from a web
service, that is served up via IE and the GUI, however when I
interrogate the data using the IE dev toolbar I notice that all the
element properties render useless as they are all of the same nature
and properties.

Bellow is an extract from an example xml response in which I want to
capture the given Shortname and Long name (TestA) and set them as
variables for use later in the script when accessing another system
and validating the data between the two GUI’s.

TESTA
TestA

I hope the information provided is sufficient and understandable.

Thanks again


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Security Alert frustration

2008-12-03 Thread winstan

Hi Bill,

You're correct, as soon as the browser tries to navigate to that URL
it just hangs as it cannot control the "Security Alert" pop up dialog
and accept yes. Out of all the examples that i have attempted in my
script, which one would you suggest i use and attempt to get working.

I just attempted to do as you stated by moving the popup-handling code
above the "ie = Watir::IE.start_process(webserv_v4)" but still the
same issue is evident where it cannot handle the pop-up, hence my
above question.

Thanks for your assistance with this.

On Dec 4, 3:10 pm, "Bill Agee" <[EMAIL PROTECTED]> wrote:
> Does your script block at the following line and not continue?  Or is there
> some other problem?
>
> ie = Watir::IE.start_process(webserv_v4)
>
> If that line is where things go wrong, try moving the popup-handling code
> above that line - otherwise the Security Alert dialog is probably going to
> prevent your script from reaching the next line.
>
> On Wed, Dec 3, 2008 at 5:02 PM, winstan <[EMAIL PROTECTED]>wrote:
>
>
>
>
>
> > Hey Guys,
>
> > Second post here, and unfortunately, is related to a topic that has
> > been discussed to no end. The security alert pop-up associated with
> > IE6 and certificated URL's. I have searched high and low and have
> > tried every possible solution I have come by but still to no prevail,
> > I still can't click the yes on the security alert dialogue. Please
> > could you more savvy water guys take a look at my script and perhaps
> > point me in the right direction.
>
> > Bear in mind it is a mess as I have been trying to resolve the
> > security pop up issue I am having and at the same time this is just a
> > simple spike script as a proof of concept.
>
> > Many thanks with anticipation.
>
> > W
>
> > ===­=
>
> > require 'watir'
> > require 'watir/ie'
> > require 'watir/contrib/enabled_popup'
> > require 'watir/WindowHelper'
> > require 'watir/winClicker'
>
> >  def push_security_alert_yes
> >        Watir.autoit.WinWait "Security Alert", ""
> >        Watir.autoit.Send "{TAB}"
> >        Watir.Send "{TAB}"
> >        Watir.Send "{SPACE}"
> >    end
>
> > #def startClicker(browser, button_label, waitTime= 9, user_input=nil)
> >  # get a handle if one exists
> >  #hwnd = browser.enabled_popup(waitTime)
> >  #if(hwnd)  # yes there is a popup
> >    #w = WinClicker.new
> >    #if(user_input)
> >      #w.setTextValueForFileNameField(hwnd, user_input.to_s)
> >    #end
> >    # I put this in to see the text being input it is not necessary to
> > work
> >    #sleep 3
> >    # "OK" or whatever the name on the button is
> >    #w.clickWindowsButton_hwnd(hwnd, button_label.to_s)
> >    # this is just cleanup
> >    #w = nil
> >  #end
> > #end
>
> > webserv_v4 = 'https://sensitiveurl.com'
> > rdm_sit = 'http://sensitiveurl.com'/'
>
> > #puts "Opening new browser"
> > #puts ""
> > #ie = Watir::IE.new
> > #ie = Watir::IE.new
> > #ie.maximize
>
> > puts "Step 1: point browser to the Web Server v4"  + webserv_v4
> > puts""
> > ie = Watir::IE.start_process(webserv_v4)
>
> > wc = WinClicker.new
> > wc.clearSecurityAlertBox()
>
> > #helper = WindowHelper.new
> > #helper.push_security_alert_yes()
>
> > #        Watir.autoit.WinWait "Security Alert", ""
> > #        Watir.autoit.Send "{TAB}"
> > #        Watir.autoit.Send "{TAB}"
> > #        Watir.autoit.Send "{SPACE}"
>
> > #push_security_alert_yes
>
> > #startClicker(ie,"Yes")
>
> > ===­=-
> >  Hide quoted text -
>
> - Show quoted text -

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Security Alert frustration

2008-12-03 Thread winstan

Hey Guys,

Second post here, and unfortunately, is related to a topic that has
been discussed to no end. The security alert pop-up associated with
IE6 and certificated URL's. I have searched high and low and have
tried every possible solution I have come by but still to no prevail,
I still can’t click the yes on the security alert dialogue. Please
could you more savvy water guys take a look at my script and perhaps
point me in the right direction.

Bear in mind it is a mess as I have been trying to resolve the
security pop up issue I am having and at the same time this is just a
simple spike script as a proof of concept.

Many thanks with anticipation.

W



require 'watir'
require 'watir/ie'
require 'watir/contrib/enabled_popup'
require 'watir/WindowHelper'
require 'watir/winClicker'

  def push_security_alert_yes
Watir.autoit.WinWait "Security Alert", ""
Watir.autoit.Send "{TAB}"
Watir.Send "{TAB}"
Watir.Send "{SPACE}"
end

#def startClicker(browser, button_label, waitTime= 9, user_input=nil)
  # get a handle if one exists
  #hwnd = browser.enabled_popup(waitTime)
  #if(hwnd)  # yes there is a popup
#w = WinClicker.new
#if(user_input)
  #w.setTextValueForFileNameField(hwnd, user_input.to_s)
#end
# I put this in to see the text being input it is not necessary to
work
#sleep 3
# "OK" or whatever the name on the button is
#w.clickWindowsButton_hwnd(hwnd, button_label.to_s)
# this is just cleanup
#w = nil
  #end
#end




webserv_v4 = 'https://sensitiveurl.com'
rdm_sit = 'http://sensitiveurl.com'/'

#puts "Opening new browser"
#puts ""
#ie = Watir::IE.new
#ie = Watir::IE.new
#ie.maximize

puts "Step 1: point browser to the Web Server v4"  + webserv_v4
puts""
ie = Watir::IE.start_process(webserv_v4)

wc = WinClicker.new
wc.clearSecurityAlertBox()


#helper = WindowHelper.new
#helper.push_security_alert_yes()

#Watir.autoit.WinWait "Security Alert", ""
#Watir.autoit.Send "{TAB}"
#Watir.autoit.Send "{TAB}"
#Watir.autoit.Send "{SPACE}"

#push_security_alert_yes

#startClicker(ie,"Yes")



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to handle Security Alert or Certificate Exception popup

2008-12-02 Thread winstan

Hi Tony,

Being new to the wonderful world of watir i have infact come across
the security alert pop up and have tried a few of the examples on
other threads with how to control the pop-up so one can proceed,
however so for to no prevail. I would liek to give your process a
whirl how ever how would i go about including your work within my
script.

Many thanks,

Lucas

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Frame access

2008-11-30 Thread winstan

Im having real issues trying to click a frame within a frame. I have
tried using indexes, names, id's etc to try and get the click
happening however to no prevail i have come here for some guidance.

Bellow is the tree structure as illustrated by the IE developer
toolbar:

(Cutdown tree-view showing the element i wish to access)


---
---
--
-#document

---
---
--
-


When performing a ie.show_frames with irb this is what is output to
the cmd-line:

irb(main):057:0> ie.show_frames
there are 3 frames
frame  index: 1 name:
frame  index: 2 name: fraNavigation
frame  index: 3 name: fraContent
=> 0..2

Im trying the following command just to get any thing working even if
its not the right element but its not doing any thing in the browser
despite returning a positive result on the cmd-line:

irb(main):058:0> ie.frame(:index,1).table(:index,1).click
=> 0.234

What am i doing wrong?

Many thanks with anticipation.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---