[Watir-webdriver] : How to compare to results

260 views
Skip to first unread message

watir webdriver

unread,
Aug 15, 2013, 11:37:42 AM8/15/13
to watir-...@googlegroups.com
Is there any way to compare two sets of strings which I've printed on the command prompt.

When I click on a link it opens a child window there I've to read two header texts and print them on the command prompt. (Ex : TS377NWT,KM077BLK).I've to repeat the same step one more time to get the results.On second run I got (Ex : TS399NAV,KM039NPK).
How can I compare these two results which i've printed on the command prompt.

Any suggestions ?

Thanks in-advance.

John Fitisoff

unread,
Aug 15, 2013, 12:16:19 PM8/15/13
to watir-...@googlegroups.com
Just store everything in strings and then compare by == or a regexp, whichever makes more sense, then print the console output afterward?



From: watir webdriver <watirweb...@gmail.com>
To: watir-...@googlegroups.com
Sent: Thursday, August 15, 2013 8:37 AM
Subject: [wtr-general] [Watir-webdriver] : How to compare to results

--
--
Before posting, please read http://watir.com/support. In short: search before you ask, be nice.
 
watir-...@googlegroups.com
http://groups.google.com/group/watir-general
watir-genera...@googlegroups.com
 
---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-genera...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Tadeu Panato

unread,
Aug 15, 2013, 1:01:00 PM8/15/13
to watir-...@googlegroups.com
.eql? 

a = "TS377NWT"
b = "KM077BLK"

a.eql? b

watir webdriver

unread,
Aug 15, 2013, 1:07:07 PM8/15/13
to watir-...@googlegroups.com
Thanks for the reply...but here I've to verify first result set(a&b) with second result set(a&b) not a.eql?b
Any suggestions?
--
--
Before posting, please read http://watir.com/support. In short: search before you ask, be nice.
 
watir-...@googlegroups.com
http://groups.google.com/group/watir-general
watir-genera...@googlegroups.com
 
---
You received this message because you are subscribed to a topic in the Google Groups "Watir General" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/watir-general/2wJPx7K1xJc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to watir-genera...@googlegroups.com.

Tadeu Panato

unread,
Aug 15, 2013, 1:16:17 PM8/15/13
to watir-...@googlegroups.com
you receive the values in one string?

like a = ["TS377NWT", "KM077BLK"] or a = "TS377NWT,KM077BLK" ??

in case is the first:
a[0].eql?(a[1])

if is the second case:
 
a = a.split(",")
then use the code above

this is programming logic not watir-webdriver questions.



Em quinta-feira, 15 de agosto de 2013 14h07min07s UTC-3, watir webdriver escreveu:
Thanks for the reply...but here I've to verify first result set(a&b) with second result set(a&b) not a.eql?b
Any suggestions?

On Thursday, August 15, 2013, Tadeu Panato wrote:
.eql? 

a = "TS377NWT"
b = "KM077BLK"

a.eql? b


Em quinta-feira, 15 de agosto de 2013 12h37min42s UTC-3, watir webdriver escreveu:
Is there any way to compare two sets of strings which I've printed on the command prompt.

When I click on a link it opens a child window there I've to read two header texts and print them on the command prompt. (Ex : TS377NWT,KM077BLK).I've to repeat the same step one more time to get the results.On second run I got (Ex : TS399NAV,KM039NPK).
How can I compare these two results which i've printed on the command prompt.

Any suggestions ?

Thanks in-advance.

--
--
Before posting, please read http://watir.com/support. In short: search before you ask, be nice.
 
watir-...@googlegroups.com
http://groups.google.com/group/watir-general

 
---
You received this message because you are subscribed to a topic in the Google Groups "Watir General" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/watir-general/2wJPx7K1xJc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to watir-general+unsubscribe@googlegroups.com.

watir webdriver

unread,
Aug 15, 2013, 1:19:03 PM8/15/13
to watir-...@googlegroups.com
Thanks Panato for ur quick reply...I'll give a try....
watir-genera...@googlegroups.com

 
---
You received this message because you are subscribed to a topic in the Google Groups "Watir General" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/watir-general/2wJPx7K1xJc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to watir-genera...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages