Skip to content

Selenium element.text() is not considered as a string

Im trying to get an element name with python selenium and print it later but it throws following error: Code line looks like this: HTML element looks like this: I tried searcing for element by XPath but it seems not to be a reason for error… Answer To get a web element text you should apply .text on it,…

Python/Pandas bring value based on another DF

I have two dataframe, below I am trying to fill df[“Possibilites”] with df2[“first_name”] if key_words in df2[“first_name”] with this code: it returns what i expect but gives a warning also: ” SettingWithCopyWarning: A value is trying to be set on a copy of a slice fr…

decouple function and class into separate files

I have a file that has a thousand line of codes and I’d like to break it into several files. However, I found those functions depends on each other so I have no idea how to decouple those… Here is a simplified example: What is the best way to separate tensor, Tensor, and mean (put them into 3 diff…

Use external packages in eth-brownie?

I am trying open a ERC721 smart contract in Brownie on VSCode and loop through the token ids and set the URI of each in each iteration. I execute the script with brownie run scripts/parcel_asset/testpyodbc.py. I am trying to use an ODBC driver named pyodbc to query an Access database and create a cursor to it…