Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Which command in the IDE reflected info driver.findElements while exporting to JUNIT code?

View previous topic View next topic Go down

Which command in the IDE reflected info driver.findElements while exporting to JUNIT code?

Post by Yariv-H on Mon Jun 29, 2015 7:09 pm

I'm trying to understand if there is a way to see the mapping between the commands from selenium IDE into the JUNIT code while exporting these test cases?

From the java code i was able to use driver.findElements and getting List, is there a way to do so form the IDE?

I'm just looking for a quick way to use the IDE in order to located all the info i need from the web page, than export it into java code and modify the last tuning from the code.

Thanks for the help,
Yariv.

Yariv-H

Posts : 2
Join date : 2015-06-29

Back to top Go down

Re: Which command in the IDE reflected info driver.findElements while exporting to JUNIT code?

Post by ccox on Mon Jun 29, 2015 11:35 pm

No there isn't. As far as I know, javascript/selenium doesn't use lists and the tool is not built to iterate through any lists. You would have to build your own function to do this which won't save time. You could try using getEval and getElementsByTagName(), but again, it won't help your end goal. 

Just curious as to why you are exporting these? From my experience, exporting tests leads to poor practices and ends up adding more time to maintain. Copy and pasting lines is one thing, but exporting turns into a nightmare.

ccox
Master
Master

Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

Re: Which command in the IDE reflected info driver.findElements while exporting to JUNIT code?

Post by Yariv-H on Tue Jun 30, 2015 2:05 pm

ccox wrote:No there isn't. As far as I know, javascript/selenium doesn't use lists and the tool is not built to iterate through any lists. You would have to build your own function to do this which won't save time. You could try using getEval and getElementsByTagName(), but again, it won't help your end goal. 

Just curious as to why you are exporting these? From my experience, exporting tests leads to poor practices and ends up adding more time to maintain. Copy and pasting lines is one thing, but exporting turns into a nightmare.


Gotya, My main goal was to use selenium framework in order to perform an advance web crawling for 3-th party web sites, there for i need to use some pulled info and compere it with the current one on the website it self.

If your question why to use selenium, this is the only framework i found that overcome the bot detection in a lot of website and it is the closest to human activity Smile


If you have any other recommendation i would like to hear them. As well if you have a good cook book for "writing your own commands" or something like that.

Thansk,
Yariv.

Yariv-H

Posts : 2
Join date : 2015-06-29

Back to top Go down

Re: Which command in the IDE reflected info driver.findElements while exporting to JUNIT code?

Post by ccox on Tue Jun 30, 2015 9:11 pm

Are you just using IDE to create the tests and then exporting them as JUnit? Or are you actually using IDE to run these tests?

It wouldn't make sense to maintain the same scripts in two formats, let alone build custom functions in IDE when you have them in webdriver. But like I said, you can always use the getEval command in IDE which will execute javascript commands.

My question isn't why are you using selenium, but why are you exporting tests? If you are recording in Selenium IDE, you can copy and paste in a clipboard format of your choice, eliminating the export. Exporting the tests gives you basically a single class for all of your tests and functions. This is a poor practice since with Selenium you should be using a page object pattern. Hopefully this makes sense.

ccox
Master
Master

Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

Re: Which command in the IDE reflected info driver.findElements while exporting to JUNIT code?

Post by seluserqwb1 on Mon Jul 06, 2015 8:09 pm

Please post your question in official webdriver forum  - 
www.seleniumtests.com/p/selenium-2-forum.html

seluserqwb1
Active particpant
Active particpant

Posts : 20
Join date : 2015-06-29

Back to top Go down

Re: Which command in the IDE reflected info driver.findElements while exporting to JUNIT code?

Post by Sponsored content Today at 1:11 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum