selenium-ide

Extract part of a text with selenium IDE and put it into variable

自古美人都是妖i 提交于 2019-12-01 13:58:19
Could somebody tell me which command should I use to extract only the number(694575) from the text using Selenium Ide and to put it into a variable for further usage. Here is the div with the text: <div class="loginBoxTitle">Edit Exhibition Centre - 694575, Exhibition Center1</div> May be commands like storeText,storeEval should work in this case ,but the part with the pasrsing is a mistery for me. I have solution, tricky 1 store | Edit Exhibition Centre - 694575, Exhibition Center1 | string store | 1 | delimiter store | javascript{storedVars['string'].split('- ')[storedVars['delimiter']]} |

Selenium how to access two controls of same css class

我们两清 提交于 2019-12-01 12:42:04
问题 I am doing testing using selenium ide. My objective is to verify the following 1) Max and Min length property of text boxes. 2) Verify the texts of the labels My html code is as below: <div class="control-group"> <label class="control-label" for="input01">Email</label> <div class="controls"> <input name="data[Salon][username]" class="span4" id="username" placeholder="Username or Email" type="text"/> </div> </div> <div class="control-group"> <label class="control-label" for="input01">Password<

Selenium-IDE: How to verify/assert page refresh

一世执手 提交于 2019-12-01 09:37:38
问题 I have a link on a page, which refreshes this page when clicked. How can I verify with Selenium-IDE that the page has really been refreshed/reloaded? 回答1: I've solved it by asserting that an element which was originally present on the page, is not present on the page right after refresh, then wait untill the page is fully refreshed, and assert that the element is present again. refreshAndWait / or clickAndWait on refresh link/button assertElementNotPresent somePageSpecificElement / check that

Selenium: How to copy values from field1 to field2?

蓝咒 提交于 2019-12-01 06:21:57
问题 We are recording a test using Selenium IDE in Firefox. We need to copy a value from a read-only field to an input field. Is there a direct way I can refer the field or do I have to store and use it. An example would be great. Thanks. 回答1: You'll need two commands, one to store and one to retrieve. Assuming the read-only field has a name of Foo and the the input field has a name of Bar, then in the three boxes for the commands: Command: storeValue Target: name=Foo Value: variableName Command:

How to use Selenium to store values between tests

限于喜欢 提交于 2019-11-30 21:26:35
Selenium has the ability to temporarily store data items and then later retrieve them in subsequent tests, e.g. storeText | @id='ctl00_ContentPlaceHolder1_FormView1' | someValue This works well within a single test and also between tests in the same Test Suite when a value needs to be carried forward across test boundaries. Unfortunately it doesn't work between Test Suites (which is a requirement for our application that includes a number of workflows referring to the same object). How can Selenium be used to store values across Test Suite boundaries? It's possible to store values from a

How do I test modal dialogs with Selenium?

只谈情不闲聊 提交于 2019-11-30 19:13:19
I'm getting started with Selenium IDE and trying to test a webapp that's full of modal dialogs ( window.showModalDialog ). Recording the test seems to work (except there's nothing in the log when the dialog pops up) but they don't play back properly. The script actually opens the window (triggered by a button click), but then just waits indefinitely. Any suggestions? From the Selenium FAQ , Selenium apparently works with some types of dialogs but not others: I can't interact with a popup dialog. My test stops in its tracks! You can, but only if the dialog is an alert or confirmation dialog.

selenium ide loop through array variables

孤街浪徒 提交于 2019-11-30 15:56:39
in selenium ide, i have built a test case, in which a array variable stores the values. i have used while loop to print those array variables. here i have used "getEval | myarray[0]" to print the first value which is 'postgresql'. but the value is not listed. no error occurs. [info] Executing: |getEval | myarray = new Array('postgresql','mysql'); | | [info] script is: myarray = new Array('postgresql','mysql'); [info] Executing: |getEval | index=0; | | [info] script is: index=0; [info] Executing: |while | index < myarray.length; | | [info] Executing: |getEval | myarray[0] | mynewvalue | [info]

Set hidden input value in Selenium?

时光总嘲笑我的痴心妄想 提交于 2019-11-30 15:15:21
问题 We have hidden input fields on our form and we need Selenium to set the value of those fields. What is the best way to set the value of hidden inputs via Selenium IDE? 回答1: Easiest way I could find: Command: runScript Value: javascript{this.browserbot.getCurrentWindow().document.getElementById('hiddenElementId').value='TheValue'} 回答2: Late to the party... When you use the IDE, you can add the command type with target id=yourID and value field value , this seems to work. Copy the text below

How to Automate Mouse scrolling event in Selenium IDE

女生的网名这么多〃 提交于 2019-11-30 14:14:11
问题 I am trying to capture/automate mouse scrolling event in selenium IDE. Like in Facebook friend list page, we have to scroll to the end to list all friends. I want to automate that functionality using Selenium IDE . What i have done : with my current script i can log in to Facebook. Then on clicking on my name from the header i can go to my profile page. At my profile page, i am storing the value of number of friends, and then on clicking the friends link i can go to the friend list page. At

Set hidden input value in Selenium?

a 夏天 提交于 2019-11-30 13:56:49
We have hidden input fields on our form and we need Selenium to set the value of those fields. What is the best way to set the value of hidden inputs via Selenium IDE? Easiest way I could find: Command: runScript Value: javascript{this.browserbot.getCurrentWindow().document.getElementById('hiddenElementId').value='TheValue'} Late to the party... When you use the IDE, you can add the command type with target id=yourID and value field value , this seems to work. Copy the text below and paste it in the IDE to try it out <tr> <td>type</td> <td>id=yourID</td> <td>field value</td> </tr> This seems