Trying to reach an input field
ratnose opened this issue · comments
On a site (Wordpress) I have an input field, no matter what I set in the feature file:
When I add "something" to the inputfield "input#inpDesktop"
or
When I add "something" to the inputfield "//*[@id="inpDesktop"]"
It cannot be found, css, xpath, full xpath.
Please advice how I should reach an input field.
If your input has an id, best to match it by id only:
When I add "something" to the inputfield "#inpDesktop"
Check that you specified a correct id value and that your input element is available on the page. If the test fails, there should be a screenshot. Check that the input is there on the screen.
I've tried with an id as well this is the error I get:
- add value to an input element When I add "Test" to the inputfield "#inpPointFrMobile"
[firefox 4.19.76-linuxkit linux #1-0] Element with selector "#inpPointFrMobile" should exist exactly 1 time(s): expected [ Array(0) ] to have a length of 1 but got 0
I can see that the input is on the screen, I check for another element first and that works.
So the page is loaded as well, were do I find the screenshot?
The screenshot is in the report output. For example check the artifacts from one of the builds in CircleCI for this repository:
https://25-245997190-gh.circle-artifacts.com/0/~/report/features/fdfa4c00-223d-4e48-8cdb-4e696138ad17-performing-a-google-search.html
If you expand the scenario (tagged @Verbose
), there is a screenshot link.
Ahhhh there it is!
That also helps me figure out why it is not working.
Thanks! :)