пятница, 23 октября 2020 г.

Описание XPath с помощью Contains

 Contains примеры:


1) Класс

//a[contains(@class, 'product-formatted-price')



2) Текст


a[contains(text(),"Get")]



3) Ссылку


//a[contains(@class, 'product-purchase') and contains(@href, '" + Config.ps_base_url + "')]



4) ID


//div[contains(@id,"content")]



5) Другие (data-type...)


//span[contains(@data-type, 'no')]



6) Содержит сразу 2 условия


//span[contains(@data-type, 'no') and contains(@data-time, '0')]



7) Описать элемент, который находится внутри секции buySub1


//div[@id="buySub1"]//span[contains(@data-type, 'no') and contains(@data-tier, '0')]

Комментариев нет:

Отправить комментарий

Самые полезные ФУНКЦИИ Пайтона

 1)  PRINT - выводит на печать переменную, указанную в скобках print (average)   2)  LEN - посчитать количество элементов в списке student...