Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ six>=1.10.0
flake8>=3.3.0
requests>=2.13.0
urllib3>=1.20
BeautifulSoup>=3.2.1
BeautifulSoup4==4.6.0
unittest2>=1.1.0
chardet>=3.0.2
boto>=2.46.1
Expand Down
31 changes: 15 additions & 16 deletions seleniumbase/fixtures/base_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class MyTestClass(BaseCase):
import traceback
import unittest
import uuid
from BeautifulSoup import BeautifulSoup
from bs4 import BeautifulSoup
from pyvirtualdisplay import Display
from seleniumbase.config import settings
from seleniumbase.core.application_manager import ApplicationManager
Expand Down Expand Up @@ -160,23 +160,22 @@ def click_link_text(self, link_text, timeout=settings.SMALL_TIMEOUT):
element.click()
return
source = self.driver.page_source
soup = BeautifulSoup(source)
html_links = soup.fetch('a')
soup = BeautifulSoup(source, "html.parser")
html_links = soup.find_all('a')
for html_link in html_links:
if html_link.text == link_text:
for html_attribute in html_link.attrs:
if html_attribute[0] == 'href':
href = html_attribute[1]
if href.startswith('//'):
link = "http:" + href
elif href.startswith('/'):
url = self.driver.current_url
domain_url = self.get_domain_url(url)
link = domain_url + href
else:
link = href
self.open(link)
return
if html_link.has_attr('href'):
href = html_link.get('href')
if href.startswith('//'):
link = "http:" + href
elif href.startswith('/'):
url = self.driver.current_url
domain_url = self.get_domain_url(url)
link = domain_url + href
else:
link = href
self.open(link)
return
raise Exception(
'Could not parse link from link_text [%s]' % link_text)
raise Exception("Link text [%s] was not found!" % link_text)
Expand Down
2 changes: 1 addition & 1 deletion server_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ six>=1.10.0
flake8>=3.3.0
requests>=2.13.0
urllib3>=1.20
BeautifulSoup>=3.2.1
BeautifulSoup4==4.6.0
unittest2>=1.1.0
chardet>=3.0.2
boto>=2.46.1
Expand Down
4 changes: 2 additions & 2 deletions server_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='seleniumbase',
version='1.3.26',
version='1.3.27',
description='Test Automation Framework - http://seleniumbase.com',
long_description='Automation Framework for Simple & Reliable Web Testing',
platforms='Mac * Windows * Linux * Docker',
Expand All @@ -29,7 +29,7 @@
'flake8>=3.3.0',
'requests>=2.13.0',
'urllib3>=1.20',
'BeautifulSoup>=3.2.1',
'BeautifulSoup4==4.6.0',
'unittest2>=1.1.0',
'chardet>=3.0.2',
'boto>=2.46.1',
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='seleniumbase',
version='1.3.26',
version='1.3.27',
description='Test Automation Framework - http://seleniumbase.com',
long_description='Automation Framework for Simple & Reliable Web Testing',
platforms='Mac * Windows * Linux * Docker',
Expand All @@ -28,7 +28,7 @@
'flake8>=3.3.0',
'requests>=2.13.0',
'urllib3>=1.20',
'BeautifulSoup>=3.2.1',
'BeautifulSoup4==4.6.0',
'unittest2>=1.1.0',
'chardet>=3.0.2',
'boto>=2.46.1',
Expand Down