selenium python - assign value to a variable from web page
tried this method did not work
how can i assign the value of an element from web page to a variable using selenium python in pycharm data structure
250
a=driver.get.element(By.ID,"rate").text()
250
a=driver.get.element(By.ID,"rate").inne开发者_StackOverflow社区rHTML()
Can you try using text
instead of text()
driver = webdriver.Chrome(executable_path="D:\___\drivers\chromedriver_win32\chromedriver.exe", chrome_options=opt)
weight1 = driver.find_element(By.ID,"ContentPlaceHolder1_grd_Heads_lbl_NetWeight_0").text weight2 = float(weight1)
精彩评论