Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Selenium IDE should support exporting to Selenium 2 #2003

Closed
lukeis opened this issue Mar 2, 2016 · 32 comments
Closed

Selenium IDE should support exporting to Selenium 2 #2003

lukeis opened this issue Mar 2, 2016 · 32 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 2, 2016

Originally reported on Google Code with ID 2003

First cut is already in with r12821

(nice revision :-)

Reported by Samit.Badle on 2011-07-07 21:00:59

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I was told to comment here, so my wish for the next feature in the IDE Webdriver Formatter
is support for the assert-functions like isTextPresent. Most tests don't make much
sense if you can not verify the presence of certain content or elements and as far
as I have seen on the groups almost everyone seems to have implemented a little helper
method around the webdriver API for themselves. 

I have something like this in my framework: 

protected bool ContainsText(string text, string inside) {         
            return _driver.FindElement(By.XPath("//*[@id='" + inside + "' or @class='"
+ inside + "']")).Text.Contains(text);
        }

That additional inside element was neccessary because the much simpler approach: 

protected bool ContainsText(string text) {         
            return _driver.FindElement(By.XPath("/html/body")).Text.Contains(text);
        }

had some serious performance issues on bigger pages. At least in the release that were
en vogue at the end of last year. 


Hope that helps. 

Thanks a lot for your work. Selenium is awesome ;) 



Reported by toba303 on 2011-07-19 11:56:38

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Got redirected here to from Samit's blog.

I am voting for adding the command for selecting drop-down values; equivalent to selenium.select(id,locator)
At least the basic commands from Selenium RC toolkit need to be available unless they
are being deprecated for some reason.

Cheers to Selenium!!

Reported by monatapaswi on 2011-07-19 18:24:43

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Thanks! I have included isTextPresent and the select related commands for the next release
of the formatters.

Cheers,
Samit

Reported by Samit.Badle on 2011-07-19 18:58:51

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Is there any time frame for when this fix will be committed to trunk? Or does it live
on branch I can check out? I just built the IDE from scratch and I'm still running
into the isTextPresent problem.

Thanks for your work!

Reported by mthurman@mixedmedialabs.com on 2011-07-27 20:42:20

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Here's my vote for the verify and assert functions being included in the export to java
(Junit, TestNG). 

Thanks!

Reported by danwilliford on 2011-07-27 22:41:20

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Hi,

BTW, mentioning 'verify and assert functions' does not help me much. :-( I need atleast
the actual Selenese command or the command mentioned in the unsupported command error
message. A real snippet which I can directly use as a test case will be even better.

Those waiting for the isTextPresent can also explore using the assertBodyText and verifyBodyText
instead of assertTextPresent and verifyTextPresent. It should be possible to do this
with a little tweak to the patterns. I have not personally tried this, but I have a
feeling that it would work.

At the moment I am working on releasing new versions of my plugins for Selenium IDE.
I will get back to this once that is done.

Cheers,
Samit

Reported by Samit.Badle on 2011-07-28 10:19:21

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

select from dropdown would be great.

Reported by awattscurnow on 2011-08-15 04:34:22

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Greate release, it was my first taste of WebDriver and I loved every bit of it!

As for the commands to be supported, our team makes a signficant usage of all the prompt-related
messages - so I will be voting for those to be supported next.
More specifically, 'answerOnNextPrompt' and 'getPrompt'.

Reported by emanuele.ciriachi on 2011-08-19 10:47:47

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Issue 17 has been merged into this issue.

Reported by david.burns@theautomatedtester.co.uk on 2011-09-02 13:51:30

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Issue 2392 has been merged into this issue.

Reported by Samit.Badle on 2011-09-06 11:58:56

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

my vote for isTextPresent

Reported by Omar.GarciaPalencia on 2011-10-11 22:50:30

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I'm voting for formatting support for select(selectLocator, optionLocator) as JUnit4
(WebDriver). 

Thanks, and keep up the great work!
Daved

Reported by dfdumaresq on 2011-10-20 16:34:11

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Similar to Daved's vote:  I vote for formatting support for select(selectLocator, optionLocator)
but as Ruby (WebDriver).

Reported by tricker on 2011-10-20 16:37:13

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Here's a good example of how to do this for both single and multiple selection, in Java.
http://www.openwritings.net/public/selenium-2/select-single-and-multiple-options

Reported by dfdumaresq on 2011-10-21 02:33:57

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

it's november.  is this code ever going out?

Reported by adamf663 on 2011-11-03 18:47:18

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Issue 2805 has been merged into this issue.

Reported by barancev on 2011-11-15 21:59:57

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

It's been a while since there have been any updates to this issue. Any status updates
here?

Personally, I would vote for:

* getElementPositionLeft (and similar commands: getELementPositionTop, etc.)
* getEval
* clickAt

Reported by denaje on 2012-02-06 17:04:06

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Issue 3341 has been merged into this issue.

Reported by dave.hunt on 2012-02-09 15:06:29

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I am trying to record clicking a checkbox using IDE, (which works fine). It's when I
export to Python 2(WebDriver) and run the script from a command line I get the ERROR:
Unsupported Command. I have tried three commands all with the same error, so I would
like to vote for: "ClickAt", "RunScript" and "IsTextPresent". Now I will note that
the field I am trying to record is "hidden" but IDE can still record it...its when
I convert over to Python and run it that it does not play back the click. Even if I
use the general "Click" command, I get this error: "Error: locator strategy either
id or name must be specified explicitly." I tried a few things with that still to no
avail. really at a dead end here.

Selenium is the main tool I use to record my scripts and it works excellent! I hope
to see these code changes soon since I am relying on them for my work :)

Chris C

Reported by ccortes@aam.us.com on 2012-03-01 18:20:31

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I am voting for adding the commands for  multiple selection in Drop Down,  selenium.addSelection("")
, Option to Locate the Element by the Label name using xpath and all the basic commands
from Selenium RC.

Cheers,
Megala R

Reported by megalar@dacamsys.com on 2012-03-16 06:34:10

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Any update on this enhancement? I'd like to see support for isTextPresent. Alternately,
has anyone set up a SeIDE extension or created a custom Format already which implements
some of the missing functions like isTextPresent?

Reported by jason@flurry.com on 2012-05-01 21:28:46

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Hi,

isTextPresent has made it to the PythonWebdriver API already, any news on the exporter
updates?

Björn

Reported by iceelch on 2012-05-25 07:48:45

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Can you guys please target isTextPresent implementation for Selenium IDE, as its blocking
all users from applying most of assertions from IDE

Reported by ssit.kiran on 2012-07-10 16:22:22

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

pythonformatter/chrome/content/formats/python2-wd.js: add

WDAPI.Driver.prototype.isTextPresent = function(what) {
  return this.ref + 'isTextPresent("'+ what + '")';
}

selenium-ide/content/formats/webdriver.js: add 
SeleniumWebDriverAdaptor.prototype.isTextPresent = function(what) {
   var driver = new WDAPI.Driver();
   return driver.isTextPresent(this.rawArgs[0]);
};


and isTextPresent is recognized.

Reported by iceelch on 2012-07-27 13:18:03

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

where is this file? pythonformatter/chrome/content/formats/python2-wd.js

i can't find it

Reported by isac.newton on 2012-07-29 13:44:33

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

http://code.google.com/p/selenium/source/browse/#svn%2Ftrunk%2Fide%2Fplugins%2Fpython-
format%2Fsrc%2Fcontent%2Fformats

(The other location is where it appears if you just unzip the .xpi-file

Reported by iceelch on 2012-07-30 06:14:59

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Hi,

isTextPresent is now available in revision r17718. This adds aupport for assertTextPresent,
verifyTextPresent, waitForTextPresent, assertTextNotPresent, verifyTextNotPresent,
waitForTextNotPresent into all four officially supported webdriver formatters, viz.,
CSharp, Java, Ruby and Python. The store* variations are still pending, but for the
majority of users, this should already be useful. Since, this is the first cut of the
command exporter, expect some bugs. Let me know if you find something that does not
work as expected. I am thinking of another way to implement this command which may
be better.

Cheers,
Samit

Reported by Samit.Badle on 2012-08-26 12:37:33

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I would like to have mouseDown and mouseUp generated in WebDriver for Java. For the
time being I use actions.click() and actions.release().

Reported by antopaul on 2013-07-02 06:38:32

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

It is implemented, in general. bugs specific to each command should be filed as separate
issues.

Reported by barancev on 2013-10-21 18:16:35

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Can you provide all the Selenese commands that can convert into Webdriver code with
java formatter.

Reported by rjanapala@tripodtech.net on 2014-01-31 05:51:02

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Hi this is arun.
i am running a selenium script it is getting error message 

Unable to locate element: {"method":"id","selector":"a_setup"}

could any one give me solution for this.

Thanks in advance.
arun

Reported by arunamohanqc on 2015-04-01 07:36:28

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by luke.semerau on 2015-09-17 18:13:10

  • Labels added: Restrict-AddIssueComment-Commit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant