New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Click on button[type=submit] not working #758
Comments
Please do provide test to reproduce this. |
well this is Yii2/Yii1 module bug caused by this method: $I = new TestGuy($scenario);
$I->wantTo('perform actions and see result');
$I->amOnPage('/index.html');
$I->see('Login','button');
#this will not work even for <input type="submit" name="yt0" value="Login"/>
#same for click, also other locator types not working button[type=submit], etc. page source <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
<title>My Web Application - Login</title>
</head>
<body>
<div class="container" id="page">
<div class="form">
<form id="login-form" action="/demo_app/index.php/login" method="post">
<p class="note">Fields with <span class="required">*</span> are required.</p>
<div class="row">
<label for="LoginForm_username" class="required">Username <span class="required">*</span></label> <input name="LoginForm[username]" id="LoginForm_username" type="text" /> <div class="errorMessage" id="LoginForm_username_em_" style="display:none"></div> </div>
<div class="row">
<label for="LoginForm_password" class="required">Password <span class="required">*</span></label> <input name="LoginForm[password]" id="LoginForm_password" type="password" /> <div class="errorMessage" id="LoginForm_password_em_" style="display:none"></div> <p class="hint">
Hint: You may login with <kbd>demo</kbd>/<kbd>demo</kbd> or <kbd>admin</kbd>/<kbd>admin</kbd>.
</p>
</div>
<div class="row rememberMe">
<input id="ytLoginForm_rememberMe" type="hidden" value="0" name="LoginForm[rememberMe]" /><input name="LoginForm[rememberMe]" id="LoginForm_rememberMe" value="1" type="checkbox" /> <label for="LoginForm_rememberMe">Remember me next time</label> <div class="errorMessage" id="LoginForm_rememberMe_em_" style="display:none"></div> </div>
<button type="submit" name="yt0" >Login</button>
</form></div><!-- form -->
</div><!-- content -->
</div><!-- page -->
</body>
</html> |
this bugs are not very critical i think but very annoying and can push developers to not to use codeception. |
+1 , i have the same problem with Laravel 4. SeeIfContactFormWorksCept.php: $I->click('#send input[type=submit]'); Page source: <div class="form-group">
<input class="btn btn-lg btn-primary btn-block" id="send" type="submit" value="Send"></div> Result:
I have the same issue if i try with any of the following: $I->click('#send');
$I->click('Send');
$I->click('Send','.btn-primary'); |
I will work on it tomorrow. |
It was long time ago, will check if this bug still exists, it mainly was noted when bootstrap page style (as you see other user also use bootstrap) was checked, so can you try it with bootstrap and see what can be? |
@DavertMik after upgrading to 1.8.2 everything turned to green 👍 |
It is very old bug, so problem is in the title of this issue, code below
is not working, and this bug is forcing people to use
submitForm
that has different locators format as i've described here #726.So this bug should be definitely fixed.
The text was updated successfully, but these errors were encountered: