Search Results

Search found 3 results on 1 pages for 'geb'.

Page 1/1 | 1 

  • Geb not working with chrome driver

    - by user2346867
    @Grapes([ @Grab("org.gebish:geb-core:0.9.0"), @Grab("org.gebish:geb-spock:0.9.0"), @Grab("org.seleniumhq.selenium:selenium-firefox-driver:2.33.0"), @Grab("org.seleniumhq.selenium:selenium-chrome-driver:2.33.0"), @Grab("org.seleniumhq.selenium:selenium-support:2.26.0"), @Grab( group='org.spockframework', module='spock-core', version='0.3' ), @Grab(group='org.gebish', module='geb-implicit-assertions', version='0.9.0') ]) import geb.Browser import geb.spock.GebReportingSpec import org.openqa.selenium.chrome.* import spock.lang.Specification import geb.navigator.NonEmptyNavigator import geb.navigator.factory.* System.setProperty("webdriver.chrome.driver", "C:\\chromedriver\\chromedriver.exe"); def browser = new Browser(driver: new ChromeDriver()) browser.go "http://www.google.com/" assert browser.title == "Google" browser.$("input", name: "q").value("query") When i try to run the above code i am getting the following error WARNING: Sanitizing stacktrace: java.lang.NoClassDefFoundError: Could not initialize class geb.navigator.NonEmptyNavigator at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:171) at geb.navigator.factory.DefaultInnerNavigatorFactory.class$(DefaultInnerNavigatorFactory.groovy) at geb.navigator.factory.DefaultInnerNavigatorFactory.$get$$class$geb$navigator$NonEmptyNavigator(DefaultInnerNavigatorFactory.groovy) at geb.navigator.factory.DefaultInnerNavigatorFactory.createNavigator(DefaultInnerNavigatorFactory.groovy:40) at geb.navigator.factory.InnerNavigatorFactory$createNavigator.call(Unknown Source) at geb.navigator.factory.AbstractNavigatorFactory.createFromWebElements(AbstractNavigatorFactory.groovy:44) at geb.navigator.factory.NavigatorFactory$createFromWebElements.callCurrent(Unknown Source) at geb.navigator.factory.BrowserBackedNavigatorFactory.getBase(BrowserBackedNavigatorFactory.groovy:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1671) at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3408) at geb.navigator.factory.AbstractNavigatorFactory.getProperty(AbstractNavigatorFactory.groovy) at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227) at geb.content.NavigableSupport.getNavigator(NavigableSupport.groovy:39) at geb.content.NavigableSupport.$(NavigableSupport.groovy:96) at geb.content.NavigableSupport$$.call(Unknown Source) at geb.Page.$(Page.groovy) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1085) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909) at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:848) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:831) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:164) at geb.Browser.methodMissing(Browser.groovy:193) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:837) Any idea on this how to resolve it ???

    Read the article

  • geb StaleElementReferenceException

    - by Brian Mortenson
    I have just started using geb with webdriver for automating testing. As I understand it, when I define content on a page, the page element should be looked up each time I invoke a content definition. //In the content block of SomeModule, which is part of a moduleList on the page: itemLoaded { waitFor{ !loading.displayed } } loading { $('.loading') } //in the page definition moduleItems {index -> moduleList SomeModule, $("#module-list > .item"), index} //in a test on this page def item = moduleItems(someIndex) assert item.itemLoaded So in this code, I think $('.loading') should be called repeatedly, to find the element on the page by its selector, within the context of the module's base element. Yet I sometimes get a StaleElementReference exception at this point. As far as I can tell, the element does not get removed from the page, but even if it does, that should not produce this exception unless $ is doing some caching behind the scenes, but if that were the case it would cause all sorts of other problems. Can someone help me understand what's happening here? Why is it possible to get a StaleElementReferenceException while looking up an element? A pointer to relevant documentation or geb source code would be useful as well.

    Read the article

  • Book Review (Book 10) - The Information: A History, a Theory, a Flood

    - by BuckWoody
    This is a continuation of the books I challenged myself to read to help my career - one a month, for year. You can read my first book review here, and the entire list is here. The book I chose for March 2012 was: The Information: A History, a Theory, a Flood by James Gleick. I was traveling at the end of last month so I’m a bit late posting this review here. Why I chose this book: My personal belief about computing is this: All computing technology is simply re-arranging data. We take data in, we manipulate it, and we send it back out. That’s computing. I had heard from some folks about this book and it’s treatment of data. I heard that it dealt with the basics of data - and the semantics of data, information and so on. It also deals with the earliest forms of history of information, which fascinates me. It’s similar I was told, to GEB which a favorite book of mine as well, so that was a bonus. Some folks I talked to liked it, some didn’t - so I thought I would check it out. What I learned: I liked the book. It was longer than I thought - took quite a while to read, even though I tend to read quickly. This is the kind of book you take your time with. It does in fact deal with the earliest forms of human interaction and the basics of data. I learned, for instance, that the genesis of the binary communication system is based in the invention of telegraph (far-writing) codes, and that the earliest forms of communication were expensive. In fact, many ciphers were invented not to hide military secrets, but to compress information. A sort of early “lol-speak” to keep the cost of transmitting data low! I think the comparison with GEB is a bit over-reaching. GEB is far more specific, fanciful and so on. In fact, this book felt more like something fro Richard Dawkins, and tended to wander around the subject quite a bit. I imagine the author doing his research and writing each chapter as a book that followed on from the last one. This is what possibly bothered those who tended not to like it, I think. Towards the middle of the book, I think the author tended to be a bit too fragmented even for me. He began to delve into memes, biology and more - I think he might have been better off breaking that off into another work. The existentialism just seemed jarring. All in all, I liked the book. I recommend it to any technical professional, specifically ones involved with data technology in specific. And isn’t that all of us? :)

    Read the article

1