-
Im using Python Webdriver Selenium for web scraping i know it is not the best way to scraping , anyway when i used ID to get page text some blocks that includ text did not copy its seems to locked i want to unlock it , im not interface with stable page that can you edit HTML manualy im using code to put some digit that give me a result which copy it then reply this prosses with new digit after copyed the last text result with “while” and so on . This is the code username=2000234361 while (username<2000234371): |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
I’m having difficulty following what you are trying to accomplish and what the problem(s) are. I _think_ the first problem you say you are having is this line:
does not work because the “txtNameEN” field is disabled. Some googling suggests you might try the “value” property, such as:
|
Beta Was this translation helpful? Give feedback.
-
Unfortunately it didn’t work Traceback (most recent call last): |
Beta Was this translation helpful? Give feedback.
-
OK, try:
substituting “write_element_id_here” appropriately. Not a Selenium expert, merely googling “selenium disabled text field”. |
Beta Was this translation helpful? Give feedback.
-
Also it did not work : AttributeError: ‘WebElement’ object has no attribute ‘getAttribute’ Most of Selenium tutorials on java nor python |
Beta Was this translation helpful? Give feedback.
-
Whelp, my Selenium ignorance is showing. This suggests it is “.get_attribute(‘value’)”, not “.getAttribute(“value”)”. Which is confirmed by the docs. |
Beta Was this translation helpful? Give feedback.
-
Finally it is work !! Thank you |
Beta Was this translation helpful? Give feedback.
Whelp, my Selenium ignorance is showing.
This suggests it is “.get_attribute(‘value’)”, not “.getAttribute(“value”)”. Which is confirmed by the docs.