Good evening, Marcin
Here is the code which confuses me:
class DefaultTestClass {
private static Browser browser;
@BeforeClass
public static void setUp() {
ClassLoader classLoader = DefaultTestClass.class.getClassLoader();
File file = new
File(classLoader.getResource("chromedriver.exe").getFile());
System.setProperty("webdriver.chrome.driver", file.path);
browser = new Browser()
browser.driver = new ChromeDriver();
browser.baseUrl = "
http://www.very.co.uk/"
browser.driver.manage().window().maximize();
}
@Test
public void start() {
Browser.drive(browser, {
to HomePage
chooseCategory('Men', 'Trainers')
at GalleryPage
})
}
@AfterClass
public static void tearDown() {
browser.quit();
}
}
class HomePage extends Page {
static url = '
http://www.very.co.uk/'
static at = {title == 'Very | Womens, Mens and Kids Fashion,
Furniture, Electricals & More!'}
static content = {
categoryByName {catName -> $("#topNav a", text: catName)}
subcatName{ catName -> $(".topNavCol a", text: catName)}
}
def chooseCategory(String category, String subCategory) {
interact {moveToElement categoryByName(category)}
subcatName(subCategory).click()
}
}
I know that current code could be refactored...but the main point is
'interact' block.
I found a workaround - replace moveToElement on clickAndHold, but
again it is not what I want.
NOTE: While you trying to reproduce it, keep mouse cursor in the
bottom of the page
Marcin, thank you in advance and I'm looking forward for a feedback
Thanks,
Alex
2016-11-01 23:12 GMT+02:00 Marcin Erdmann <
marcin....@proxerd.pl>:
> Hi Aleksandr,
>
> Can you please share your code that performs the interaction in question?
>
> I don't think anything related to handling of mouse actions in the interact
> { } blocks changed between 0.13.1 and 1.0. There were some implementation
> changes in that area but they were released as part of 0.13.0.
>
> Marcin
>
> On Tue, Nov 1, 2016 at 12:17 PM, Aleksandr Abrosimov <
box4...@gmail.com>
> wrote:
>>
>> Hi, I'm using Geb 1.0v and faced with unexpected behavior:
>>
>> After I apply 'moveToElement' for an element from drop down menu, it's
>> just highlighted and nothing happen - menu doesn't fall down.
>> It seems like cursor hovers over menu item and takes away at once.
>>
>> The same peace of code works fine for Geb 0.13.1v
>>
>> Thanks,
>> Alex
>>
>> --
>> 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.
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Geb User Mailing List" group.
> To unsubscribe from this topic, visit
>
https://groups.google.com/d/topic/geb-user/oiQFSbY5OXo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
>
geb-user+u...@googlegroups.com.
>
https://groups.google.com/d/msgid/geb-user/CA%2B52dQS1G3uc-_QRwyvOuAZ10D9A8mUXrW6Obf064HkCchWgSA%40mail.gmail.com.