title: Selenium - 'None' value from element
body: <p>I wan't to get the value or the price of a stock from a trading website. The problem is, that when i'm using the .get attribute method like this:</p>
  
  <pre><code>.get_attribute('')
  </code></pre>
  
  <p>I can't seem to find anything to put in between the '' that will give me the value of the stock</p>
  
  <p>Here is an image of the line when using inspect:
  <a href="https://i.stack.imgur.com/jMz3b.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jMz3b.png" alt="enter image description here"></a></p>
  
  <pre><code>&lt;span _ngcontent-c31="" class="price__value" style="" xpath="1"&gt; 187.510 &lt;/span&gt;
  </code></pre>
  
  <p>This is the code below that i've been making for this:</p>
  
  <pre><code>from selenium import webdriver
  from selenium.webdriver.common.keys import Keys
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions as EC
  from selenium.webdriver.common.by import By
  import time
  
  browser = webdriver.Chrome('/Users/ludvighenriksen/downloads/chromedriver')
  browser.get('https://www.forex.com/en-uk/account-login/')
  
  username_elem = browser.find_element_by_name('Username')
  username_elem.send_keys('kebababdulaziz@gmail.com')
  
  password_elem = browser.find_element_by_name('Password')
  password_elem.send_keys('KEbababdulaziz')
  password_elem.send_keys(Keys.ENTER)
  
  time.sleep(5)
  
  search_elem = WebDriverWait(browser, 20).until(EC.element_to_be_clickable(
  (By.CSS_SELECTOR, "input.market-search__search-input")))
  search_elem.click()
  search_elem.send_keys('FB')
  
  search_click_elem = WebDriverWait(browser, 20).until(EC.element_to_be_clickable(
  (By.XPATH, "//app-market-table[@class='search-results-element ng-star-inserted']//div[@class='price--buy clickable-price arrows-flashing']")))
  browser.execute_script("arguments[0].click();", search_click_elem)
  
  price_elem = browser.find_element_by_css_selector("div.mercury:nth-child(2) div.mercury__body:nth-child(4) div.mercury__body-content-container app-workspace.ng-star-inserted:nth-child(3) div.panel-container:nth-child(1) app-workspace-panel.active.ng-star-inserted div.workspace-panel-content.workspace-panel-content--no-scroll-vertical.workspace-panel-content--no-scroll-horizontal.workspace-panel-content--auto-size div.workspace-panel-content__component.workspace-panel-content__component--auto-size app-deal-ticket.ng-star-inserted form.ticket-form.ng-untouched.ng-pristine.ng-invalid.ng-star-inserted div.market-prices app-market-prices.main-prices.ng-untouched.ng-pristine.ng-valid div.market-prices div.market-prices__direction label.buy.selected span.price.ng-star-inserted:nth-child(2) &gt; span.price__value")
  price_value = price_elem.get_attribute('value')
  print(price_value)
  </code></pre>
  
  <p>The ('value') isn't working which makes sense i guess, but I think i've tried all that i could think of - and it prints out none.
  The log in to the website is included if you want to try it out, thanks in Advance</p>