When i was testing my program, it’s end with code 1 here is full error (“Traceback (most recent call last): File “C:Usersds072PycharmProjectspythonProjectmain.py”, line 20, in <module> wait.until(EC.element_to_be_clickable((By.XPATH, “/html/body/main/div/div/div/div[1]/div[3]/div[1]/div[1]/input”))).send_keys(“my username”)”) here is my code (https://pastebin.com/RThnY8GY) I have tested alternatives for this value (“/html/body/main/div/div/div/div[1]/div[3]/div[1]/div[1]/input”) but with out results :C Please help me Answer The following is one way to select those fields
Tag: webdriver
Failed to get only the “text” from “span” by selenium
this is my code: my results: site element: I want to get only the number “16.98”, instead im getting the whole element. When im trying to write “.text” it returns “none”. Answer Instead .text use get_attribute(‘textContent’) the element might be hidden on the page. This should return $16.98 to get the 16.98 use string manipulation like
How to find the attribute and element id by selenium.webdriver?
I am learning web scrapping since I need it for my work. I wrote the following code: However, it is showing the following error: Then I inspect the table that I wanna scrape this table from this page what is the attribute that needs to be included in get_attribute() function in the following line? what I should write in the
How to get text from a html using Selenium and Python which has two elements with the same classname where I need to extract both
I have a html like: and my python code like: Is it possible make this get all elements with same class name and put on a array or define as different variable like this? OutPut: #or Actualy my code only get the first one Answer As per the HTML: The following line line of code: will always identify the first
Could not get version for google-chrome with the command: powershell “$ErrorActionPreference=’silentlycontinue’ using WebDriver manager and Selenium
I’m trying to create a script using python that separate 2 kind of websites , the one with SPF included and the others with SPF , and classify them using python, so in the beginning it worked perfectly but these daysit gives me a message error that I don’t find a clue about it The output message is as follows:
How to move selenium webdriver to next page after clicking submit button?
So I got to the point where my program fills in the textbox and clicks the proceed with booking button with a submit() command, however in the html there is no url to put in the driver.get([url]) method to move my driver to the next page. All subsequent methods called on driver are on the “Proceed with booking” page instead
Selenium Python Searching Element By 2 possible ID
I want to find the element using ID, but it seems that the web is sometimes changing the ID. There are 2 IDs, the first ID will make me possible to enter the email directly, but if the second ID occurs, I need to click a button first before entering my email. I’ve tried using if and else logic but
Viable locator strategies for partial link text in webdriver
I’m testing a messaging app, and I’m planning to have the code wait until it receives the message, “Hello, my name is Jeff.” 2 pieces of failed code I tried: Is visibility of element located a sub-par choice for partial link text? If so, what would be a viable alternative? If the issue is something else, what could it be?
Select a button with selenium with same XPATH but no tag or id
I would like to select a button with selenium on the net, here’s the HTML code of the button: They are 1 to 5 and have all the same XPATH : //html/body/div[2]/div/section/section/div[1]/div/div[2]/div[1]/div[2]/div[2]/div/div[2]/div/div[1]/div/button[1] How can I select the third or second button with no tag in the HTML code? Answer You can use find_elements instead of find_element. Then you can get
After filling first card number field I can’t find any iframes on the page. How to solve this
class TestAplazame(unittest.TestCase): Look from here iframes are only available to the top block iframes elements are not available to the bottom block. included error message at the bottom if name == ‘main’: unittest.main() Even I can’t find the same iframe anymore. What is the problem. how to fix it. It’s a payment gateway test. gateway is from stripe I believe.