Hi Alexander

Thank you for verifying. Just my luck that both Selenium actions I tried to 
use within Geb have different implementations across web drivers and 
apparently Firefox is the only one that does work instead of chromedriver 
being the one that doesn't work :)

So is this something that is happening within the browser's drivers or 
within selenium's drivers? Where could I share my/our findings? 
https://github.com/SeleniumHQ/selenium/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen
 
?

Best
Martin


On Saturday, January 12, 2019 at 3:08:28 PM UTC+1, Alexander Kriegisch 
wrote:
>
> Hi Martin.
>
> The MCVE is helpful. But Chromedriver is by no means the only driver 
> having issues here. The same test also fails on PhantomJS, Edge, Opera on 
> my Windows machine. For Edge and Opera your workaround also fixes the 
> issue, but not for PhantomJS. Maybe drag'n'drop is not supported there at 
> all, I have not checked the documentation, just gave it a little spin. 
> Basically I just used your test, but created a page object instead of using 
> your hard-coded selectors. The issue is still clearly reproduceable. I also 
> think the Chromium issue you linked in your message is what causes the 
> problem.
> Regards
> --
> Alexander Kriegisch
> https://scrum-master.de
>  
> Martin de laat schrieb am 04.01.2019 17:01:
>
> Hi Alexander, 
>  
> You're right. I was just happy to finally get it to work and frustrated 
> regarding the time it took for something trivial like triggering a double 
> click or simulating a drag.
>   
> I spent some time digging for the root cause. I also found this thread, 
> probably similar problem: 
> https://bugs.chromium.org/p/chromedriver/issues/detail?id=841 so I'm not 
> the only one
>  
> MCVE:
>  
> package //todo add package
>
>
> import geb.spock.GebReportingSpec
>
>
>
>
> class visExampleTest extends GebReportingSpec {
>
>
>   def "dragging vis-js module"() {
>     given:
>     go "http://visjs.org/examples/timeline/interaction/animateWindow.html";
>     waitFor{ $(".vis-item-content").first().displayed }
>     def visModule = $(".vis-item-content").first()
>     def xCoordinate = visModule.getX()
>
>
>     when:
> //    I select and then drag the module 100 pixels right
>     visModule.click()
>     waitFor{ $(".vis-drag-center").displayed }
>     def draggable = $(".vis-drag-center")
>
>
>     interact{
>       clickAndHold(draggable)
>       moveByOffset(100, 0)
>
>
>       //Uncomment next line to get it to work with chrome
>       //moveByOffset(100, 0)
>
>
>       release()
>     }
>
>
>     then:
> //    the first visModule should've moved
>     xCoordinate != visModule.getX()
>   }
>
>
>   def "double clicking test"() {
>     given:
>     go "https://unixpapa.com/js/testmouse-2.html";
>     waitFor{ $("#link").displayed }
> //    def visModule = $(".vis-item-content").first()
> //    def visModule = driver.findElement(By.id("link"))
>     def clickable = $("#link")
>
>
>     when:
>     interact{
>       doubleClick(clickable)
>     }
>
>
>     println("browser ID: " + $("body > tt").text())
>     println("action log: " + $("body > table > tbody > tr > 
> td:nth-child(1) > form > textarea").value())
>     sleep(10000)
>
>
>     then:
>     true
>   }
> }
>
>
>  
>
>  
> So, for me, on mac, the output for the double click test was:
>  
> chrome:
> browser ID: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/
> 537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
> action log: mousedown   which=1 button=0 buttons=1
> mouseup     which=1 button=0 buttons=0
> click       which=1 button=0 buttons=0
> dblclick    which=1 button=0 buttons=0
>  
> (the stated browser ID (recognized by the test website) confuses me. But 
> it's equal to the browser ID when I navigate to the website via my Mac with 
> chrome installed)
>  
> firefoxdriver:
>  
> browser ID: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:64.0) Gecko/
> 20100101 Firefox/64.0
> action log: mousedown   which=1 button=0 buttons=1
> mouseup     which=1 button=0 buttons=0
> click       which=1 button=0 buttons=0
> mousedown   which=1 button=0 buttons=1
> mouseup     which=1 button=0 buttons=0
> click       which=1 button=0 buttons=0
> dblclick    which=1 button=0 buttons=0
>  
>  
> I'm a junior developer and new to the OS community. I'm kinda unsure where 
> the exact fault lies and what would be the best place to share this 
>  
> --
> 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 [email protected] <javascript:>.
> To post to this group, send email to [email protected] 
> <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/geb-user/3acebc61-5d90-48ac-a834-f59af1ba35a0%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/geb-user/3acebc61-5d90-48ac-a834-f59af1ba35a0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/aa04eea7-8253-43e8-abd8-ce255c6defc6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to