--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/19305c01-f339-4c75-ad63-efcedc900edb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/55664810.2030904%40getsu.com.
--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/1fdc5ca8-b4ed-4064-9575-7138bfa707f4%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/1fdc5ca8-b4ed-4064-9575-7138bfa707f4%40googlegroups.com.
def "Retrieve xxxx"() { when: "Retrieve xxxx details based on Added record" XXXXXX.with { clear.click() xxxxID = whereXxxxId
action = 'getXXXX' performAction.click() }
then: "Confirm page/data" at XXXX
and: XXXX.with { whereXxxxId == xxxxID.value() createUserID.value() createDateTime.value() }
where: whereXxxxId << xxxxIdsThatWereAdded }
birthDate { $(browser.getNavigatorFactory().createFromWebElements([browser.driver.findElement(By.id('birthDate'))])) }
birthDate { $(browser.getNavigatorFactory().createFromWebElements([browser.driver.findElement(By.id('birthDate'))])) }
birthDate { $(By.id('birthDate')) }
...
Regretfully I can not share the code.
The page simply defines 23 fields by id, 5 by name, one by text and 1 by title. Of the 30 fields 7 are marked as (required: false). All 7 of these fields are "read only" ... application status, etc.
I am using 0.10.0Based on Brian's suggestion and looking at the 0.10.1 [which I can not use until it is released] documentation and seeing the "By.xxx" selector support I changed how I find an element.
My closures now look like ...
birthDate { $(browser.getNavigatorFactory().createFromWebElements([browser.driver.findElement(By.id('birthDate'))])) }
Side note ... this does meet the '''really ugly but reasonably fast' content template" option I mentioned in my first post ;-}This brought the time down from the original 36 seconds to 20 seconds so at least now we are in the same ball park and it may be palatable.
I realize it without the code it is difficult to make meaningful suggestions but any other suggestions ... possibly related to configuration of wait values [which I admit I am not confident in my understanding] or things that might influence implicit waits would be appreciated.
Marcin,Just curious. Do you think the improvements with https://github.com/geb/issues/issues/306 and https://github.com/geb/issues/issues/333 will make a difference over the closure that I am currently using:
birthDate { $(browser.getNavigatorFactory().createFromWebElements([browser.driver.findElement(By.id('birthDate'))])) }
I am currently at "43% slower" ... 14 vs 20 seconds ... and that is a 'significant con' against the Geb solution. It has been suggested that I try the current 0.10.1 snapshot but I'm not optimistic about a performance improvement without 306 and 333 [and even with 306 and 303 I have no idea what to expect]. My closure would become less ugly:
birthDate { $(By.id('birthDate')) }
but I suspect that alone will not make a marked improvement in performance.
Make sure that your css selectors are as specific as possible when you are selecting by text. So if say you're selecting paragraphs by text that live inside a div with some class when you want to do:
I think that you can simplify this to:birthDate { $(browser.driver.findElement(By.id('birthDate')))
Be aware that the way you're accessing browser is not part of the public api so this might break in future releases. Hopefully this stuff will be fixed in 0.11.0 so that you will not have to do any of this anymore.
It is very interesting that selecting using By.id("id") has different performance than selecting using By.css("#id"). I suspect that it might actually be specific to IE driver (which in general is way slower than other drivers). After #333 is implemented using $(id: "id") will be equivalent to using By.id("id"). In general, the support for using By for selecting was introduced to support selecting using xpath expressions if you really need/want to. I consider using By selectors with Geb not idiomatic so we will have to make sure that you can use the idiomatic way of selecting elements with Geb and not pay any performance penalty by doing so.
As long as your page is not dynamic and you're not using waitFor() {} or the "wait" content template option (or are you?) then waiting configuration will not affect you at all.
--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/1c988784-5769-4de0-89e9-54d763c218f6%40googlegroups.com.
On Friday, May 29, 2015 at 7:11:33 AM UTC-5, Marcin Erdmann wrote:Make sure that your css selectors are as specific as possible when you are selecting by text. So if say you're selecting paragraphs by text that live inside a div with some class when you want to do:I am currently not using any css selectors, just the "ugly version" for all of my calls. By.id(), By.name() or By.linkText(). Those three currently cover all of my navigation needs.
I think that you can simplify this to:birthDate { $(browser.driver.findElement(By.id('birthDate')))I will try that and report back. I had the extra factory call in there as I though I would be better of returning a geb Navigator rather than a Selenium WebElement .
It is very interesting that selecting using By.id("id") has different performance than selecting using By.css("#id"). I suspect that it might actually be specific to IE driver (which in general is way slower than other drivers). After #333 is implemented using $(id: "id") will be equivalent to using By.id("id"). In general, the support for using By for selecting was introduced to support selecting using xpath expressions if you really need/want to. I consider using By selectors with Geb not idiomatic so we will have to make sure that you can use the idiomatic way of selecting elements with Geb and not pay any performance penalty by doing so.To be clear I never tried the By.css("#id") version. I simply went with what seemed to be the brutal "direct to the browser ugly version".
As long as your page is not dynamic and you're not using waitFor() {} or the "wait" content template option (or are you?) then waiting configuration will not affect you at all.The pages are not dynamic. The only waitFor I have is on the 'at' statement ... which seems to make sense ... and having it there did not seem to make a timing difference and "you have to wait for the page to stabilize" seemed to make sense. Note that in the home grown framework we need to add a wait statement ... it is simply a "pause for xxx milliseconds" with no short circuit if the page actually is stabilized or any other tests ... before we can use a new page.
All content has (cache: true, required: false) on them. The required: false made a slight improvement as the contents of the page is "validated" ... or not validated as the case may be ... when it appears in the browser. It made a second or two difference.
The internal framework does not validate the page, simply fails if it can not find the attribute when it is referenced, so I wanted to make it an 'unsafe apples to unsafe apples' comparison. There is no documented coupling between cache and required ... i.e. if it's not required then is it still cached the first time it is used or is it not cached because the page is not scanned for required elements or ...? so I'm not sure if the cache:true has any effect or not. It does not appear to change the timing but cache: true does exhibit some instability that I had previously mentioned so the hypothesis is that "it does something'.
--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/CA%2B52dQQvxhfv%2BJZvdc_CPyd6mcVMpqLLk%3Dyzk7CSHk-q%3DmZgWw%40mail.gmail.com.
To be honest, I think this has nothing to do with Geb. As far as I know there were no claims from this fantastic framework about such performance metrics. Whilst it is good that frameworks are optimised, there will always be some cost that comes with it.
This seems to me like the case of a guy buying a Bentley and asking how much it would cost him to fill the petrol tank.
If there are improvements that can be made, lets raise tickets for them and even offer to contribute where we can.
I speak for myself and this is my opinion.
Kind Regards,
Ed.
--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/c07a9993-158e-47e1-bb74-85e4282d71d0%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/CAB06vMA%3DEo%3DM-1NqsustU0iks7rUWnFaLU6adZHuk3_wov0U0Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/c07a9993-158e-47e1-bb74-85e4282d71d0%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/14d06bf0-9071-4507-9301-7c841b987432%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/0cda852b-7d7a-4a8c-a1f0-8b30bb29a582%40googlegroups.com.