cheezy / page-object

Gem to implement PageObject pattern in watir-webdriver and selenium-webdriver
MIT License
653 stars 220 forks source link

Some numbers skipped when trying input #456

Closed qaisbadsha closed 5 years ago

qaisbadsha commented 6 years ago

I am using a text field to fill out some info like: 1037734912 but the 3's don't get printed into the text field and I only get 10774912

text_field(:thisfield ,:id=>'IDforit',:frame=>frame)
on(myPage).thisField = 1037734912

I am using it like that (Where I have a myPage defined)

titusfortner commented 6 years ago

you are inputting a String to the field, so try with quotes:

on(myPage).thisfield = "1037734912"

You can see what is getting sent to and from the driver by doing:

Selenium::WebDriver.logger.level = :info
on(myPage).thisfield = "1037734912"
on(myPage).thisfield

The input and output in the STDOUT should be the same

Is your driver up to date for the browser you are using? Does your code work with a different browser?

qaisbadsha commented 6 years ago

I was doing something wrong when updating the drivers. Re-updated the drivers and it is now working.

koerbcm commented 6 years ago

@qaispak I am having this same issue. Can you please elaborate on what you did to solve this?

koerbcm commented 6 years ago

I figured it out. I been in the code so long troubleshooting I forgot about the chromedriver. After updating the chromedriver, everything worked great.

ctsstc commented 6 years ago

I thought I was having an issue, but I came to find out that I needed to wrap quotes around my env value so that it picked up the proper characters. Figured I'd post this facepalmer in case anyone else ends up here like I did.

dmitrym0 commented 6 years ago

This is happening to me, with the latest (to date) version of webdriver. I'm entering a fairly long string and frequently the input is cut off at 3-5 characters.

jkotests commented 5 years ago

Page-Object doesn't do a whole lot for typing values. It's just delegated to the underlying Watir, Selenium-WebDriver and driver. This issue will be best reported in one of those projects - typically the driver.