[wtr-general] Re: test is taking a long time in webdriver v classic

2014-01-08 Thread Chuck van der Linden
With the way you have things, I think it is having to relocate the row and 
cells each time it goes through the loop

While it does not answer the slowness question, maybe it would be faster to 
build a collection of cells for each of the proper rows, (so that is done 
once) and then work directly with those collections (so you iterate within 
the collection you've already built) 

Did I phrase that in a way that makes sense? 



On Monday, December 30, 2013 1:52:40 PM UTC-8, hillary wrote:

 That might be what's causing the slow down. I'm just not sure how to speed 
 up the test, because i do have to check each td to see that it has the 
 correct setting. 

 On Tuesday, December 24, 2013 12:49:26 AM UTC-8, Jarmo Pertman wrote:

 I have also noticed that as soon as you go down to table's row and cell 
 levels (e.g using #td and #tr methods) then it becomes really, really, 
 reaay slow when using webdriver. Not sure about the reason though.

 Maybe Jari can comment on that?

 Jarmo Pertman
 -
 IT does really matter - http://itreallymatters.net


 On Tuesday, December 24, 2013 1:46:01 AM UTC+2, hillary wrote:

 I have a test that takes upwards of 15 minutes or more to complete when 
 running it in webdriver(ie, firefox, chrom) v classic for ie (which takes 
 35s). I'm using taza with turnip as the test framework, running on windows 
 7x64 bit with ruby 2.0. 

 Most of the test runs at a fine speed, but the step of the test that 
 bogs everything down is this loop 

 (1..slots).each do |s|
   @site.slotting.slot_title(@variant_id, s).text.should eq s.to_s
   @site.slotting.slot_checkmark(@variant_id, s).should exist
 end


 This is how i defined those elements: 
 element(:slot_title) {|variant_id,index| browser.div(:id, 
 grid_Variant_#{variant_id}).div(:id, cpsess-#{variant_id}).
 table.tr.td(:index, 5).table.tr.td(:index, index).div(:index, 0)}
 element(:slot_checkmark) {|variant_id,index| browser.div(:id, 
 grid_Variant_#{variant_id}).div(:id, cpsess-#{variant_id}).
 table.tr.td(:index, 5).table.tr.td(:index, index).div(:index, 
 1).image(:src, /checkmark.png/)}

 I currently have to use indexes because it is not fesable to ask for ids 
 for each tr/td element at this time. 


 So i'm wondering two things: 

1. Why is the following loop significantly slower in 
watir-webdriver? 
2. Is there a better way to write this validation. I'm trying to 
validate that all of the Columns in the highlighted section of the 
 attached 
screenshot have a checkmark underneath the number. 



-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@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-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[wtr-general] Re: test is taking a long time in webdriver v classic

2014-01-07 Thread hillary

should i file a bug with watir-webdriver?

I can't really think of a faster way of doing the validation of this area, 
and i need to start using webdriver to test firefox and chrome. There's 
probably 10 cases that have validations of this area and i can't run those 
tests if it's going to take ~17 minutes per test.   

On Monday, December 23, 2013 3:46:01 PM UTC-8, hillary wrote:

 I have a test that takes upwards of 15 minutes or more to complete when 
 running it in webdriver(ie, firefox, chrom) v classic for ie (which takes 
 35s). I'm using taza with turnip as the test framework, running on windows 
 7x64 bit with ruby 2.0. 

 Most of the test runs at a fine speed, but the step of the test that bogs 
 everything down is this loop 

 (1..slots).each do |s|
   @site.slotting.slot_title(@variant_id, s).text.should eq s.to_s
   @site.slotting.slot_checkmark(@variant_id, s).should exist
 end


 This is how i defined those elements: 
 element(:slot_title) {|variant_id,index| browser.div(:id, 
 grid_Variant_#{variant_id}).div(:id, 
 cpsess-#{variant_id}).table.tr.td(:index, 
 5).table.tr.td(:index, index).div(:index, 0)}
 element(:slot_checkmark) {|variant_id,index| browser.div(:id, 
 grid_Variant_#{variant_id}).div(:id, 
 cpsess-#{variant_id}).table.tr.td(:index, 
 5).table.tr.td(:index, index).div(:index, 1).image(:src, /checkmark.png/)}

 I currently have to use indexes because it is not fesable to ask for ids 
 for each tr/td element at this time. 


 So i'm wondering two things: 

1. Why is the following loop significantly slower in watir-webdriver? 
2. Is there a better way to write this validation. I'm trying to 
validate that all of the Columns in the highlighted section of the 
 attached 
screenshot have a checkmark underneath the number. 



-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@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-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[wtr-general] Re: test is taking a long time in webdriver v classic

2013-12-30 Thread hillary
That might be what's causing the slow down. I'm just not sure how to speed 
up the test, because i do have to check each td to see that it has the 
correct setting. 

On Tuesday, December 24, 2013 12:49:26 AM UTC-8, Jarmo Pertman wrote:

 I have also noticed that as soon as you go down to table's row and cell 
 levels (e.g using #td and #tr methods) then it becomes really, really, 
 reaay slow when using webdriver. Not sure about the reason though.

 Maybe Jari can comment on that?

 Jarmo Pertman
 -
 IT does really matter - http://itreallymatters.net


 On Tuesday, December 24, 2013 1:46:01 AM UTC+2, hillary wrote:

 I have a test that takes upwards of 15 minutes or more to complete when 
 running it in webdriver(ie, firefox, chrom) v classic for ie (which takes 
 35s). I'm using taza with turnip as the test framework, running on windows 
 7x64 bit with ruby 2.0. 

 Most of the test runs at a fine speed, but the step of the test that bogs 
 everything down is this loop 

 (1..slots).each do |s|
   @site.slotting.slot_title(@variant_id, s).text.should eq s.to_s
   @site.slotting.slot_checkmark(@variant_id, s).should exist
 end


 This is how i defined those elements: 
 element(:slot_title) {|variant_id,index| browser.div(:id, 
 grid_Variant_#{variant_id}).div(:id, cpsess-#{variant_id}).
 table.tr.td(:index, 5).table.tr.td(:index, index).div(:index, 0)}
 element(:slot_checkmark) {|variant_id,index| browser.div(:id, 
 grid_Variant_#{variant_id}).div(:id, cpsess-#{variant_id}).
 table.tr.td(:index, 5).table.tr.td(:index, index).div(:index, 
 1).image(:src, /checkmark.png/)}

 I currently have to use indexes because it is not fesable to ask for ids 
 for each tr/td element at this time. 


 So i'm wondering two things: 

1. Why is the following loop significantly slower in watir-webdriver? 
2. Is there a better way to write this validation. I'm trying to 
validate that all of the Columns in the highlighted section of the 
 attached 
screenshot have a checkmark underneath the number. 



-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@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-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[wtr-general] Re: test is taking a long time in webdriver v classic

2013-12-24 Thread Jarmo Pertman
I have also noticed that as soon as you go down to table's row and cell 
levels (e.g using #td and #tr methods) then it becomes really, really, 
reaay slow when using webdriver. Not sure about the reason though.

Maybe Jari can comment on that?

Jarmo Pertman
-
IT does really matter - http://itreallymatters.net


On Tuesday, December 24, 2013 1:46:01 AM UTC+2, hillary wrote:

 I have a test that takes upwards of 15 minutes or more to complete when 
 running it in webdriver(ie, firefox, chrom) v classic for ie (which takes 
 35s). I'm using taza with turnip as the test framework, running on windows 
 7x64 bit with ruby 2.0. 

 Most of the test runs at a fine speed, but the step of the test that bogs 
 everything down is this loop 

 (1..slots).each do |s|
   @site.slotting.slot_title(@variant_id, s).text.should eq s.to_s
   @site.slotting.slot_checkmark(@variant_id, s).should exist
 end


 This is how i defined those elements: 
 element(:slot_title) {|variant_id,index| browser.div(:id, 
 grid_Variant_#{variant_id}).div(:id, 
 cpsess-#{variant_id}).table.tr.td(:index, 
 5).table.tr.td(:index, index).div(:index, 0)}
 element(:slot_checkmark) {|variant_id,index| browser.div(:id, 
 grid_Variant_#{variant_id}).div(:id, 
 cpsess-#{variant_id}).table.tr.td(:index, 
 5).table.tr.td(:index, index).div(:index, 1).image(:src, /checkmark.png/)}

 I currently have to use indexes because it is not fesable to ask for ids 
 for each tr/td element at this time. 


 So i'm wondering two things: 

1. Why is the following loop significantly slower in watir-webdriver? 
2. Is there a better way to write this validation. I'm trying to 
validate that all of the Columns in the highlighted section of the 
 attached 
screenshot have a checkmark underneath the number. 



-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@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-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.