joao-carloto / FireRobot

Firefox extension for Robot Framework/Selenium.
Other
28 stars 6 forks source link

Invalid XPath generated for element of gaming page #24

Closed alans09 closed 10 years ago

alans09 commented 10 years ago

setup1: firefox 19/win7x64 setup2: firefox 32/macosx 10.9

problem: Navigate to e.g. www.sme.sk; www.mmo-champion.com; (literally any webpage) I started FireRobot Pressed Select Elements # whole page is outlined I can't select any element on this page # from time to time, popup with information that tells me that 'we are unable to create xpath to element' appears

What Am I missing?

joao-carloto commented 10 years ago

Hi alans09. Thanks for the feedback. I only did a quick check for now. One thing I noticed is that the page takes a long time to load (at least where I'm at). You must wait for it to load completely to enter select mode. Also, if the page content refreshes (due to some event) the selections are cleared and the select mode is switched off (it's not the "same" page and selections may not be valid). However, I could make selections, locate elements and run tests on both pages (see screen shot). capture I had one situation where I was selecting e big chunk of content and I had the popup message you mentioned. I will look more closely when I have the time.

I hope you don't mind me editing the issue title to something more specific.

alans09 commented 10 years ago

This is strange I just can't get it working. I waited for about 10minutes for that page.... After clicking Select elements, page and that flash elements are outlined but thats all I can do with it.

I can't select any forum post link or title or any element that is located on screen.

I looked on firefox addons and I have only Firebot, TestOptimal WebMBT Builder and Web Developer.

I'm trying for example webpage http://methis.info where are no dynamic elements and it is the same as before... just can't identify nothing.

It's look like I have to investigate what is going on. 2 systems and it is not working on any of it.

joao-carloto commented 10 years ago

Hi again. I tried the http://methis.info page and also had no problem with selecting stuff and adding test steps. The only thing I could confirm, so far, was that clicking on a specific element on www.mmo-champion.com would produce that invalid xpath message

Meanwhile, i updated to form FF31 to FF32 and found a major incompatibility (not specific with this tool). This will not allow to run the tests from the browser. Se new issue at https://github.com/joao-carloto/FireRobot/issues/25. However this is not related with what you reported.

joao-carloto commented 10 years ago

I have a possible explanation. Could you run the following steps?

  1. In Firefox, go to Developer -> Browser console.
  2. Open one of the sites where you were having problems.
  3. In the browser console, check if you are having many GET "http://..." messages. Even when you think the page should have completely loaded. Check if those GETs are for add related pages like pubmatic.com.
  4. If the answer to the previous is yes, install the Addblock plus extension: https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/.
  5. Check if the never ending GETs stop.
  6. If the answer to the previous is yes, test Firerobot again.
  7. If this fixes your main problem, you might want to consider running a malware check.
joao-carloto commented 10 years ago

Me again. Regarding the invalid xpath message in www.mmo-champion.com I think I found the culprit. There's some malformed HTML on the page, namely the usage of '<' instead of '&lt'. Used correctly in some places, bad_less_than In the case depicted, Firerobot was trying to locate an element with the <stones> tag. There's not much more the extension could do in this case.

joao-carloto commented 10 years ago

May this be the same issue as described in #29? Can you confirm that the latest release (v1.0.6) fixes it?