In this post we continue to discuss selenium testing for a Ext JS application.
Last week, we were writing selenium tests for an Ext JS application when we experienced odd behaviour in which calls to click a checkbox were being totally ignored. Passing either the id of the checkbox or the entire XPath to the checkbox into the selenium
click() method made no difference and had no effect.
Having tried pretty much everything else, we gave using the selenium
clickAt() method a shot instead. The
clickAt() method requires passing in relative co-ordinates indicating whereabouts on the object the mouse should click, so we started with "0,0".
We're still not sure of the reasons behind it, but this worked. Using
clickAt("checkboxId", "0,0"), the checkbox was now being clicked by selenium.
If you're having trouble getting Selenium to click a checkbox on your Ext JS application - try the
clickAt()method instead of
Want to know more about what it's like to work in tech at Simply Business? Read about our approach to tech, then check out our current vacancies.Find out more
We create this content for general information purposes and it should not be taken as advice. Always take professional advice. Read our full disclaimer
6th Floor99 Gresham StreetLondonEC2V 7NG
Sol House29 St Katherine's StreetNorthamptonNN1 2QZ
© Copyright 2020 Simply Business. All Rights Reserved. Simply Business is a trading name of Xbridge Limited which is authorised and regulated by the Financial Conduct Authority (Financial Services Registration No: 313348). Xbridge Limited (No: 3967717) has its registered office at 6th Floor, 99 Gresham Street, London, EC2V 7NG.