Selenium Python Tutorial #22 - How to Get Text of an Element in Selenium

Selenium Python Tutorial #22 - How to Get Text of an Element in Selenium

Software Testing Mentor

3 года назад

29,410 Просмотров

Ссылки и html тэги не поддерживаются


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

Doug M
Doug M - 02.10.2023 20:25

Watching the videos in order and apologies if you cover this later, but how do you write an expect statement in Python i.e., to expect certain text to be on a page and if not, raise an exception?

Ответить
kushinagarkhabar
kushinagarkhabar - 29.01.2023 20:21

Super

Ответить
mehdizade 021
mehdizade 021 - 21.01.2023 13:44

thanksssssss! I search for a problem 3 days and you solved it!!!!!!!!

Ответить
Darlin Manuel Casado Perez
Darlin Manuel Casado Perez - 25.11.2022 21:17

great tutorial!

Ответить
c ü k e
c ü k e - 17.11.2022 12:40

Thanks master.

Ответить
Hatoji
Hatoji - 16.11.2022 11:29

how to get text from website using explicit wait?

Ответить
Parthiv Shah
Parthiv Shah - 15.11.2022 11:48

Nice.

Ответить
Anil Rathod
Anil Rathod - 15.09.2022 13:53

Very helpful

Ответить
FITRIONO ARYA RISKI
FITRIONO ARYA RISKI - 11.06.2022 16:49

How can i get text in tag div??is the same use "text"?

Ответить
Manoj Kumar
Manoj Kumar - 27.05.2022 15:46

count = driver.find_element(By.XPATH, "//p[normalize-space()='Query would return 137232 records.']").text - used this code to get content from webpage and store in count ,but I'm getting this error ''selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//p[normalize-space()='Query would return 137232 records.']"}".....Can you help on this?

Ответить
central processing unit
central processing unit - 24.05.2022 07:24

this doesnt work if the text changes everytime in the website.

Ответить
Gabriel Novaes
Gabriel Novaes - 15.03.2022 05:14

thank you bro

Ответить
Erick Eng
Erick Eng - 10.03.2022 13:57

Hi, how can I get the attribute when its happens? value='xxxxxxx'>12.8%. When I try to get what the program show me is xxxxxxx

Ответить
Gael Gendre
Gael Gendre - 28.02.2022 14:33

Thank you

Ответить
Cody Gao
Cody Gao - 27.01.2022 16:35

What if I want to highlight that text and send keys like Ctrl+C instead of merely getting that text, Thanks

Ответить
HelgaTech
HelgaTech - 02.01.2022 04:54

THANK YOU ! You helped me

Ответить
Narasimhareddy Kasireddy
Narasimhareddy Kasireddy - 30.12.2021 19:08

Sir this topic I want to RIDE editor on robot automation plzz

Ответить
Rafael Jesus
Rafael Jesus - 16.12.2021 09:22

it doesn't work, it doesn't find the xpath and I am using webbrowser module, it gives me the error "no such element"

Ответить
Zahoor Ahmad Kareemi
Zahoor Ahmad Kareemi - 30.11.2021 10:12

how can i get parent element text not its child element texts

Ответить
Namrata Bedare
Namrata Bedare - 22.10.2021 19:05

Hi can you please give the name of tool with link to capture elements ?

Ответить
Unknown
Unknown - 26.09.2021 21:56

Thanks for the tutorial, very helpful! ;D

Ответить
Roenrode Rio
Roenrode Rio - 29.07.2021 15:49

How to use this in a WebDriverWait where it has to wait for the element to appear before getting the text on it?

Ответить
imperiall saadman
imperiall saadman - 09.06.2021 20:21

very helpful

Ответить
Vibhor Sharma
Vibhor Sharma - 18.04.2021 17:27

Thank you

Ответить