Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 37 lines (29 sloc) 1.468 kb
b5cefcb @andrewsmedina separating tests in files
andrewsmedina authored
1 class ClickElementsTest(object):
2
3 def test_click_links(self):
4 "should allow to click links"
5 self.browser.find_link_by_text('FOO').first.click()
f1a4044 @fsouza Stopped using should-dsl for asserts
fsouza authored
6 assert 'BAR!' in self.browser.html
b5cefcb @andrewsmedina separating tests in files
andrewsmedina authored
7
8 def test_click_element_by_css_selector(self):
9 "should allow to click at elements by css selector"
d2c51ed @fsouza Fixed tests to adapt to new Firefox webdriver behaviour
fsouza authored
10 self.browser.find_by_css('a[href="http://localhost:5000/foo"]').first.click()
f1a4044 @fsouza Stopped using should-dsl for asserts
fsouza authored
11 assert 'BAR!' in self.browser.html
b5cefcb @andrewsmedina separating tests in files
andrewsmedina authored
12
13 def test_click_input_by_css_selector(self):
14 "should allow to click at inputs by css selector"
1035d90 @fabiomcosta Fixes #49, agora dando deprecated warning nos metods que tao deprecated
fabiomcosta authored
15 self.browser.find_by_css('input[name="send"]').first.click()
f1a4044 @fsouza Stopped using should-dsl for asserts
fsouza authored
16 assert 'My name is: Master Splinter' in self.browser.html
b5cefcb @andrewsmedina separating tests in files
andrewsmedina authored
17
77344b9 @tarsisazevedo Merge
tarsisazevedo authored
18 def test_click_link_by_href(self):
19 "should allow to click link by href"
d2c51ed @fsouza Fixed tests to adapt to new Firefox webdriver behaviour
fsouza authored
20 self.browser.click_link_by_href('http://localhost:5000/foo')
77344b9 @tarsisazevedo Merge
tarsisazevedo authored
21 assert "BAR!" in self.browser.html
b5cefcb @andrewsmedina separating tests in files
andrewsmedina authored
22
7fc8068 @bernardofire support to find by partial href, closes #87
bernardofire authored
23 def test_click_link_by_partial_href(self):
24 "should allow to click link by partial href"
25 self.browser.click_link_by_partial_href('5000/foo')
26 assert "BAR!" in self.browser.html
27
efd11a9 @tarsisazevedo Add click link by text method
tarsisazevedo authored
28 def test_click_link_by_text(self):
29 "should allow to click link by text"
30 self.browser.click_link_by_text('FOO')
31 assert "BAR!" in self.browser.html
0f7a4c0 @rodrigomanhaes added support to find_ and click_link_by_partial_text
rodrigomanhaes authored
32
33 def test_click_link_by_partial_text(self):
34 "should allow to click link by partial text"
35 self.browser.click_link_by_partial_text("wordier")
36 assert "BAR!" in self.browser.html
Something went wrong with that request. Please try again.