質問編集履歴
2
誤字の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -11,9 +11,9 @@
|
|
11
11
|
```
|
12
12
|
データ型が異なるから比較ができないとエラーがでたので次に
|
13
13
|
```python
|
14
|
-
if
|
14
|
+
if float(apple_percent) <= 100:
|
15
15
|
print('aiueo')
|
16
|
-
#TypeError:
|
16
|
+
#TypeError: float() argument must be a string or a number, not 'WebElement'
|
17
17
|
```
|
18
18
|
とでました
|
19
19
|
どういうことだ?と思い次にtype()で調べてみました
|
1
書式の改善
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型にできるのでしょうか?
|