Which locators are best to use?
Сообщений в теме: 4
#1
Отправлено 07 ноября 2016 - 14:58
#2
Отправлено 07 ноября 2016 - 14:58
css or id/name
#3
Отправлено 07 ноября 2016 - 15:05
xpath
#4
Отправлено 07 ноября 2016 - 17:51
Если есть id/name, то лучше их. Но они, скорее всего, не всегда бывают, тогда css/xpath на любителя.
#5
Отправлено 14 ноября 2016 - 08:11
Css. Xpath only for cases when you didn't manage to find good css locator.
Css is much more flexible than people usually thinks.
It's shorter and more convenient for me.
I know only two things which I can't resolve by css - search element by it's text and search "previous" element from some element. In both cases - it's a question to developers, because it means that there is no id / name / class for preparing good locator.
Темы с аналогичным тегами Selenium IDE
Количество пользователей, читающих эту тему: 0
0 пользователей, 0 гостей, 0 анонимных