replaceafill | aelkner, i'm back | 00:03 |
---|---|---|
aelkner | hey, i was wondering what you know about css versus xpath in our selenium tests | 00:04 |
aelkner | css is so much nicer to use, but is it any slower? | 00:04 |
replaceafill | aelkner, i think css is faster than xpath | 00:05 |
replaceafill | i've been using css more lately | 00:05 |
replaceafill | i only use xpath for complex things | 00:05 |
replaceafill | like this div that contains that other element and so on | 00:06 |
aelkner | so you don't know of any speed issues | 00:06 |
replaceafill | aelkner, not really, haven't done any benchmarks though :) | 00:06 |
aelkner | ok, that's cool | 00:07 |
aelkner | btw, the case you just mentioned is easy in css, 'div.someclass someelement' | 00:07 |
replaceafill | no, i was talking about conditions | 00:07 |
aelkner | so much easier than "//div['@class='someclass']//someeleent | 00:07 |
aelkner | well, as long as the condition is class or id, css works well | 00:08 |
aelkner | and the syntax is so much less likely to trip one up | 00:09 |
replaceafill | sel = 'td[not(contains(@class, "placeholder"))]' | 00:09 |
aelkner | so yeah, there are still cases for using xpath | 00:10 |
replaceafill | yep | 00:10 |
aelkner | anyway, i'm really glad about the css helper | 00:10 |
* replaceafill too | 00:10 | |
aelkner | i was thinking of adding another helper to Browser, for building the absolute file name | 00:11 |
aelkner | passing it __file__ and the filename | 00:11 |
aelkner | but perhaps that's overkill | 00:11 |
replaceafill | i don't think it's very hard to create the path in a test | 00:11 |
aelkner | it's not, it's four lines, including import os | 00:12 |
aelkner | i just like economy of lines of code | 00:13 |
aelkner | it's not important | 00:13 |
*** menesis has quit IRC | 03:20 | |
*** replaceafill has quit IRC | 04:12 | |
*** replaceafill has joined #schooltool | 04:27 | |
*** replaceafill has joined #schooltool | 04:27 | |
*** replaceafill has quit IRC | 04:51 | |
*** alga has quit IRC | 05:18 | |
*** menesis has joined #schooltool | 06:31 | |
*** aks has joined #schooltool | 11:13 | |
*** alga has joined #schooltool | 15:29 | |
*** aks has quit IRC | 16:14 | |
*** alga has quit IRC | 18:34 | |
*** alga has joined #schooltool | 18:58 | |
*** alga has quit IRC | 21:35 | |
*** replaceafill has joined #schooltool | 21:52 | |
*** alga has joined #schooltool | 22:13 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!