Suggestion: add a new method resetHostBase

Open
#55 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
testing

Research direction

Start by locating the WebDriver module's amOnUrl implementation and the Configuration access shown in the issue. Add the proposed resetHostBase behavior so it returns to the configured WebDriver URL, then verify that the method works after amOnUrl is used.

Written by the indexing model from the issue text.

Description

This is a suggestion after struggling to reset the host base, that needs resetting after the use of amOnUrl()
http://codeception.com/docs/modules/WebDriver#amonurl

My suggestion is the following:
Although, it can be written much better probably

    public function resetHostBase(){
        $config = \Codeception\Configuration::config();
        $url = $config["modules"]["config"]["WebDriver"]["url"];
        $this->amOnUrl($url);
    }

I believe that this function is needed in many cases after the use of amOnUrl() when using the WebDriver.

Thank you!

Dominant language
PHP
Stars
39
Forks
23
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Codeception/module-webdriver

All issues in Codeception/module-webdriver

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.