mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
This commit is contained in:
parent
e12198152d
commit
66a6145ee9
3 changed files with 11 additions and 3 deletions
|
@ -167,6 +167,11 @@ describe Capybara::Driver::Webkit do
|
|||
subject.current_url.should =~ /hello%20there/
|
||||
end
|
||||
|
||||
it "visits a page with an anchor" do
|
||||
subject.visit("/hello#display_none")
|
||||
subject.current_url.should =~ /hello#display_none/
|
||||
end
|
||||
|
||||
it "returns the source code for the page" do
|
||||
subject.source.should =~ %r{<html>.*greeting.*}m
|
||||
end
|
||||
|
|
|
@ -7,7 +7,12 @@ Visit::Visit(WebPage *page, QObject *parent) : Command(page, parent) {
|
|||
}
|
||||
|
||||
void Visit::start(QStringList &arguments) {
|
||||
page()->currentFrame()->setUrl(QUrl(arguments[0]));
|
||||
QUrl requestedUrl = QUrl(arguments[0]);
|
||||
page()->currentFrame()->setUrl(QUrl(requestedUrl));
|
||||
if(requestedUrl.hasFragment()) {
|
||||
// workaround for https://bugs.webkit.org/show_bug.cgi?id=32723
|
||||
page()->currentFrame()->setUrl(QUrl(requestedUrl));
|
||||
}
|
||||
}
|
||||
|
||||
void Visit::loadFinished(bool success) {
|
||||
|
@ -17,4 +22,3 @@ void Visit::loadFinished(bool success) {
|
|||
|
||||
emit finished(new Response(success, message));
|
||||
}
|
||||
|
||||
|
|
|
@ -13,4 +13,3 @@ class Visit : public Command {
|
|||
void loadFinished(bool success);
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue