开发者

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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜