回答編集履歴

2

修正

2019/12/28 02:58

投稿

john_doe_
john_doe_

スコア354

test CHANGED
@@ -6,13 +6,13 @@
6
6
 
7
7
  # xpathで要素を指定
8
8
 
9
- self.driver.find_element_by_xpath('/html/body/div[1]/div[7]/section/div[2]/div[2]/section/div[2]/section[3]/h4/label/span[1]').click()
9
+ self.browser.find_element_by_xpath('/html/body/div[1]/div[7]/section/div[2]/div[2]/section/div[2]/section[3]/h4/label/span[1]').click()
10
10
 
11
11
 
12
12
 
13
13
  # classで要素を指定
14
14
 
15
- elems = self.driver.find_elements_by_class_name('choiceContent__sectionTitle')
15
+ elems = browser.driver.find_elements_by_class_name('choiceContent__sectionTitle')
16
16
 
17
17
  elem[3].find_element_by_class_name('checkbox').click()
18
18
 

1

修正

2019/12/28 02:58

投稿

john_doe_
john_doe_

スコア354

test CHANGED
@@ -4,6 +4,18 @@
4
4
 
5
5
  ```ここに言語を入力
6
6
 
7
+ # xpathで要素を指定
8
+
7
9
  self.driver.find_element_by_xpath('/html/body/div[1]/div[7]/section/div[2]/div[2]/section/div[2]/section[3]/h4/label/span[1]').click()
8
10
 
11
+
12
+
13
+ # classで要素を指定
14
+
15
+ elems = self.driver.find_elements_by_class_name('choiceContent__sectionTitle')
16
+
17
+ elem[3].find_element_by_class_name('checkbox').click()
18
+
19
+
20
+
9
21
  ```