#selenium

/

      • ranger81 joined the channel
      • thekiiingbob-sl joined the channel
      • Lord_Drake
        Ok, so the text in the headers, is located in span tags, inside divf without unique ids. Those are children (twice removed) of divs that are siblings of divs that contain children containing rows in the grids.
      • *divs
      • Fuck this html. x.
      • *x.x
      • (I swear a lot, let me know if it bothers anyone)
      • WhereIsMySpoon
        sooo... //span[text()='sometext']/../../../../div[contains(@id, 'row6jqxWidget')]
      • christian-bro-sl has quit
      • matt_allen-sl joined the channel
      • or whatever you want to use for id
      • Lord_Drake
        So it just knows to go up two, over three, down two etc?
      • WhereIsMySpoon
        that xpath says from the span, go up 4, then search for the div with that partial id
      • Lord_Drake
        Ah, gotcha.
      • kristianmeier-sl has quit
      • WhereIsMySpoon
        we go up 4 because you said the span is 3 layers down from the divs that are siblings
      • so we need to go up once more to get the parent of all of those
      • Lord_Drake
        Yep.
      • WhereIsMySpoon
        then we have the final selector
      • Lord_Drake
        Alright, let me see if I can make that work.
      • marekj-sl joined the channel
      • will-ball-sl joined the channel
      • hmcgowan-sl joined the channel
      • thekiiingbob-sl has quit
      • chele has quit
      • Rabid joined the channel
      • Rabid
        Has anyone had issues installing SafariDriver on v 9.0.1?
      • matt_allen-sl has quit
      • Has anyone had experience with the SafariDriver?
      • jimevans
        Rabid: the extension? as far as i'm aware, the open-source safari driver has been entirely deprecated.
      • Rabid
        How do you connect to Safari? I tried the server-standalone but safari is not an option
      • jimevans
        (and it wasn't that well supported to begin with)
      • mollypihl-sl joined the channel
      • Rabid
        v2.53.1 and v3.0
      • jimevans
        Rabid: how do i connect to safari now? i use apple's safari driver. :)
      • (which should be supported by all of the project-provided language bindings now, afaik)
      • lukeis joined the channel
      • WhereIsMySpoon
        and wont work with <10, right?
      • or am i thinking of the other thing
      • Rabid
        I need a RemoteWebDriver support for Safari
      • WhereIsMySpoon
        :log
      • selbot2
      • jimevans
        truth be told, though apple's safari driver implementation is still under development, so it has some issues still-to-be-worked-out. and it's safari 10 or higher, only.
      • WhereIsMySpoon
        am i thinking of the tech preview
      • Lord_Drake
        Balls. It keeps choking on my wait.
      • Rabid
        Is Apple's Safari Driver a RemoteWebDriver implementation?
      • WhereIsMySpoon
        ah no thats a different question altogether, never mind me
      • smccarthy has quit
      • Rabid: the safaridriver has nothing to do with remotewebdriver
      • jimevans
        Rabid: what language bindings are you using?
      • Lord_Drake
        WhereIsMySpoon: Valid xpath? '//span[@text = "Location Description"]/../../../../../div[contains(@id, "row0jqxWidget")]/div[2]/div'
      • jimevans bets Rabid says perl or php or something silly like that.
      • WhereIsMySpoon
        safaridriver itself, is the thing that drives the browser, like chromedriver or iedriver
      • Rabid
        C# and Java
      • WhereIsMySpoon
        Lord_Drake: no
      • Lord_Drake
        /div[2]/div not ok?
      • WhereIsMySpoon
        Lord_Drake: //span[text()="Location Description"]
      • Lord_Drake
        Oh
      • *facepalm*
      • railssmith has quit
      • WhereIsMySpoon
        not sure that [2] is valid either like that
      • marekj-sl has quit
      • jimevans
        Rabid: then, if you're using the .NET bindings, you should be able to connect directly using the SafariDriver class (assuming you're executing the code using mono or similar)
      • WhereIsMySpoon
        im pretty certain you need brackets around everything before the [2]
      • Lord_Drake
        I recall using something like that. Let me go back and look.
      • lukeis
        WhereIsMySpoon: the [2] is valid
      • will-ball-sl has quit
      • WhereIsMySpoon
        (//span[text()=Description"]/../../../../../div[contains(@id, "row0jqxWidget")]/div)[2]/div
      • lukeis: ^ like that though, no?
      • lukeis
        nope
      • jimevans
        Rabid: let me rephrase that. you need to be running your .NET code directly on the mac in order for that to work
      • hmcgowan-sl has quit
      • WhereIsMySpoon
        good luck running .net code on anything but windows
      • fuck that shit
      • *mutter*
      • smccarth_ joined the channel
      • jimevans
        WhereIsMySpoon: i've been able to successfully do that, so ease the fuck off.
      • lukeis
        his way says essentially div#row0jqxWidget > div:nth-child(2)
      • WhereIsMySpoon
        do it sure. have it work in a timely and useful fashion, nope :P
      • lukeis: i know, i just thought you needed brackets
      • lukeis
        nope, you don't
      • WhereIsMySpoon
        hm, ok
      • i guess you can ignore me on that count then Lord_Drake
      • Rabid
        Wait the whole point of RemoteWebDriver is to run scripts against a remote machine
      • Lord_Drake
        Mmk
      • Rabid
        That can't be done with MAC?
      • bret-sl joined the channel
      • lukeis
        Rabid: it can be done… what's the issue?
      • jimevans
        Rabid: i'm not entirely sure if the java remote implementation has been updated to handle safari driver capabilities. if so, all you'd need do is create a RemoteWebDriver instance, using the .ToCapabilities() method on the SafariOptions object as your capabilities.
      • but i've not actually tried that to make sure it'll work.
      • Lord_Drake
        Nope, still hanging.
      • smccarthy joined the channel
      • lukeis
        Rabid: please don't pm :) you run the standalone server (java) on the mac… run your code from your host machine… point to it with IP / hostname
      • Rabid
        We are currently using C# .NET 4.6.1 implementation
      • lukeis the standalone server for 2.53.1 and 3.0 does not have safari as an option
      • lukeis
        yes, yes it does
      • mach6-sl joined the channel
      • drharmony has quit
      • ardesco-sl has quit
      • Rabid
        I get all other options in the static/resources/hub.html not with safari
      • lukeis
        what are you doing?
      • mollypihl-sl has quit
      • Lord_Drake
      • Am I doing osmething wrong?
      • *something
      • travisl-sl joined the channel
      • WhereIsMySpoon
        Lord_Drake: i dont see "Location Description" anywhere in the html you've given me so i cant see if its wrong or not really, other than im not sure if the spaces are legal
      • around the =
      • "text() =" is an exact match btw, so if there are any spaces in that span text after or before the words, it wont match
      • Lord_Drake
        No, it's not on that page.
      • WhereIsMySpoon
        you can use contains(text(), 'mytext') if you want to do a partial
      • Lord_Drake
        I'm testing another grid atm. They're built basically the same way.
      • p0deje-sl joined the channel
      • Rabid
        I launch seleneium-server-standalone-2.53.1.jar -port 4444 and when I visit http://127.0.0.1:4444/wd/hub/static/resources/h... : create session has no dropdown for Safari
      • lukeis
        it's a valid xpath… can't tell if it works without looking at the DOM in question though Lord_Drake :)
      • Lord_Drake
        I know. Unfortunately it would take too long to rip the data out of this grid to show you.
      • lukeis
        Rabid: why don't you use RemoteWebDriver to start a session… i don't think we tried to wire in support to that with safari
      • Rabid
        I do, and it crashes
      • I use my C# code to point to that machine and it throws an exception
      • lukeis
        :gist the stacktrace?
      • selbot2
        Please paste >3 lines of text to https://gist.github.com
      • Rabid
        1 sec
      • jimevans
        Rabid: are you using safari 10?
      • Rabid
        9.0.1
      • WhereIsMySpoon
        didnt jim say it only works on 10+?
      • jimevans
        Rabid: the exception is telling you exactly what the problem is.
      • WhereIsMySpoon
        it says it right there
      • SafariDriver requires Safari 10 running on OSX El Capitan or greater.
      • >_>
      • jimevans
        because the extension-based safari driver was deprecated in favor of apple's implementation, but apple's implementation requires safari 10.
      • lukeis
        if you want to use 9.X then you must use selenium server 2.53.1 and install the selenium extension
      • bret-sl has quit
      • otherwise… just upgrade safari ;)
      • Rabid
        Can we use Safari 10+ with selenium 2.53.1?
      • lukeis
        no
      • Rabid
        That's why I was doing the selenium extension but it won't install on the machine
      • lukeis
        did you download and manually install the extension to safari?
      • (it's a one-time thing to do on Safari 9 and earlier)
      • Rabid
        I am VNC'd into the Mac, click and choose Trust, then nothing happens
      • tommywo-sl joined the channel
      • lukeis
        is it in the list of extensions installed? preferences, extensions tab
      • travisl-sl has quit
      • Rabid
        Nope, nothings showing up
      • lukeis
        ¯\_(ツ)_/¯
      • Rabid
        Even after I click trust when it pops up
      • andrew-tayler-sl joined the channel
      • p0deje-sl has quit
      • ndmanvar-sl joined the channel
      • jleyba joined the channel