ruby - Selenium can't find fields with type number -


I have a problem finding the field with the Circular HTML5 type = "number" . The way I look in the browser, I'm not a big fan of them, but I have some fields that require a number keyboard on mobile, and this is the easiest way to get it. I am using SimpleForm to create forms and when I : as = & gt; : Text does everything, but if I do : as = & gt; : Number , fields are not filled out. I have not received any error, the field is not just full.

To be specific, when I have such a step:

  and I fill "52" with  

"Application_form_age" then it will not be across the tag:

  & lt; Input class = "numeric integer required" id = "application_form_age" min = "0" name = "application_form [age]" size = "50" step = "1" type = "number" & gt;  

But it does one thing:

  & lt; Input class = "string required" id = "application_form_age" name = "application_form [age]" size = "50" type = "text" & gt; In addition, it is only in the Javascript landscape in those situations where Java JavaScript is not necessary and does not launch the landscape browser, which also works fine.  

Versions of things:

  Cappar (2.2.1) Cucumber (1.3.14) Selenium-WebDriver (2.41.0) Simple_form (2.1.1) webrat (0.7 .3) Firefox 29.0  

I have been stumped. I tried to see a bunch of applications from JS and CSS that whatever I am doing is breaking it, but there is no luck in it. I am not removing those areas in the testing environment to make it the HTML 5 type number, but I do not want to be like this. Is anyone else seeing this? I have not found any references about it, which seems to be something that I am doing. But I am unable to understand it.

First of all, I think that you have some confusion about the framework of the cucumber is a BDD framework , Which in no way does not automate the browser, so this question has nothing to do with it (this is why I have removed it from the title of your question).

It seems that you are using Capacara, which is the ATDD framework, you may want to consider showing your use of the iPad code.

Under the hood, I believe that you can use Selenium WebDriver, I can confirm that Selenium & lt; Input type = "number" & gt; (tested with Firefox 28, which supports a Selenium-WebDriver (2.41.0)).

  requires 'Selenium-WebDriver' driver = Selenium :: WebDriver: Firefox DEMO_PAGE = & lt; & Lt; -eos data: text / html, & lt; Input class = "numeric integer expected" id = "application_form_age" min = "0" name = "application_form [age]" size = "50" step = "1" type = "number" & gt; Eos driver.get (DEMO_PAGE) driver.find_element (: tag_name, 'input'). Send_keys ('25 ')  

So you can test this by using Kavithabra to create a similar demo functionality.

If the demo works, then we need to look closely at your application. Oath Similarly, please raise tickets for Capebara Developers.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -