teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

誤字の修正

2021/11/24 08:55

投稿

help-man
help-man

スコア58

title CHANGED
File without changes
body CHANGED
@@ -11,9 +11,9 @@
11
11
  ```
12
12
  データ型が異なるから比較ができないとエラーがでたので次に
13
13
  ```python
14
- if int(apple_percent) <= 100:
14
+ if float(apple_percent) <= 100:
15
15
  print('aiueo')
16
- #TypeError: int() argument must be a string, a bytes-like object or a number, not 'WebElement'
16
+ #TypeError: float() argument must be a string or a number, not 'WebElement'
17
17
  ```
18
18
  とでました
19
19
  どういうことだ?と思い次にtype()で調べてみました

1

書式の改善

2021/11/24 08:55

投稿

help-man
help-man

スコア58

title CHANGED
File without changes
body CHANGED
@@ -19,7 +19,6 @@
19
19
  どういうことだ?と思い次にtype()で調べてみました
20
20
  ```python
21
21
  print(type(apple_percent))#<class 'selenium.webdriver.remote.webelement.WebElement'>
22
- print(type(apple_percent.text))#stale element reference: element is not attached to the page document
23
22
  ```
24
23
  とでました
25
24
  どうすればint型にできるのでしょうか?