xiaofans / robotium

Automatically exported from code.google.com/p/robotium
0 stars 0 forks source link

when i using clickOnWebElement(By.xpath), Solo click the wrong web element #464

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Attached zip robot-test is the test project 
main_demo_app.zip is the tested app project.

when i run the test project, i want to click the element whose xpath is 
"/html/body/div[2]/div[1]/div/div[1]/div/div[1]/div/div/a[2]/strong", but it 
click the element whose xpath is "/html/body/div[1]/table/tbody/tr/td[1]/a/img".

   any question ,please send email to cs99lzzs@163.com.  Thank you.

Original issue reported on code.google.com by cs99lzzs...@gmail.com on 24 May 2013 at 9:36

Attachments:

GoogleCodeExporter commented 9 years ago
because the main_demo_app is large than the max size of file uploaded,  i use 
apk insteading of the project

Original comment by cs99lzzs...@gmail.com on 24 May 2013 at 9:38

GoogleCodeExporter commented 9 years ago

Original comment by renasr...@gmail.com on 26 May 2013 at 7:44

GoogleCodeExporter commented 9 years ago
i found that when calling rect = element.getBoundingClientRect(), the x 
location of rect is a float but not int. this is why clicking wrong element.

Original comment by cs99lzzs...@gmail.com on 27 May 2013 at 3:32

GoogleCodeExporter commented 9 years ago
Thanks for reporting this. 

Original comment by renasr...@gmail.com on 27 May 2013 at 5:22

GoogleCodeExporter commented 9 years ago
Please let me know if the attached jar is working better for you.

Original comment by renasr...@gmail.com on 13 Jun 2013 at 8:22

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by renasr...@gmail.com on 25 Jun 2013 at 4:25