input submit with Behat/MinkExtension
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.6k
- Forks
- 286
- PR merge metrics
- No merged PRs in 30d
Description
I have make test to add article in my project symfony but i have probleme in press input submit
this is code my feature:
Feature: ajouter
Feature: dossiertest
@javascript
Scenario: List 2 files in a directory
Given I am on the homepage
Then I should see "hello"
When I go to "/ajoutermed"
Then I should see "ajouter"
And I wait 2 seconds
And I fill in "test_medbundle_med_section" with "test section"
And I fill in "test_medbundle_med_info" with "test info"
When I click on "ajout"
Then I should see "ajouter"
this is code context:
/**
* @When /^I click on "([^"]*)"$/
*/
public function iClickOn($arg1)
{
$session = $this->getSession();
$element = $this->getSession()->getPage()->findById($arg1);
if ($element) {
$element->click();
} else {
var_dump($arg1 . " could not be found");
var_dump($element);
}
}
now i have this problem when i lunch my test in step " When I click on "ajout"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Behat feature scenario and the custom iClickOn step shown in the issue, then run the scenario to capture the actual failure behind the linked screenshot. Check whether the element identified as "ajout" is found and clicked; done means the submit step completes and the expected page content is displayed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100