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").innerHTML()
CodePudding user response:
Can you try using text
instead of text()
CodePudding user response:
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)