selenium-ide

How to store the content/value of xpath?

安稳与你 提交于 2019-12-05 15:58:02
Assume xpath as below: xpath : //div[@id='cslGridViewPanelControl']/div/div[2]/div/table/tbody/tr/td[2]/table/tbody/tr/td/table/tbody/tr/td/div Last div element contains 'Displaying 1 to 30 of 145300'. I need to store 'Displaying 1 to 30 of 145300' in some variable by using selenium tool. I tried command target value store xpath variable1 echo ${variable1} It displays as variable1: xpath. But i need variable1: 'Displaying 1 to 30 of 145300'. Can anyone help me please ? Try storeText ( locator, variableName ) Then use it ${variableName} Refer Selenium documentation for storeText saga told you

Selenium IDE - always fail on any 500 error

一笑奈何 提交于 2019-12-05 14:04:22
Is there an easy way to tell Selenium IDE that any action that results in a http 500 response means the test failed? I have tests that are 75 page requests long. Sometimes, I get a crash and burn somewhere in the middle, but the tests come back green. Taking a look at selenium-api.js, I saw that there is a parameter ignoreResponseCode in the signature of the doOpen method in selenium-api.js : Selenium.prototype.doOpen = function(url, ignoreResponseCode) { This parameter is used by the browserbot object : if (!((self.xhrResponseCode >= 200 && self.xhrResponseCode <= 399) || self.xhrResponseCode

Conditional Post-Build step in Jenkins (Ideally without plugins)

吃可爱长大的小学妹 提交于 2019-12-05 12:39:40
问题 If I understand correctly I can make a build step conditional using this plugin: https://wiki.jenkins-ci.org/display/JENKINS/Conditional+BuildStep+Plugin First does this plugin work the Post-Build steps? Second is there a way to make Post-Build steps conditional without a plugin? The scenario I have is I am supporting both WebDriver and Selenium IDE tests with one universal Jenkins Job setup. If they have checked in either type of test it runs them. I then want it to conditionally look if any

How to create custom functions in Selenium IDE?

こ雲淡風輕ζ 提交于 2019-12-05 09:27:31
This should be possible according to JavaScript Functions in Selenium IDE HTML Tests : <tr> <td>storeEval</td> <td>function(input) {return input.replace('foo', 'bar');}</td> <td>replaceText</td> </tr> <tr> <td>storeEval</td> <td>replaceText('foo')</td> <td>var</td> </tr> Instead I get the following exception: function statement requires a name After giving it a name the statement runs: <tr> <td>storeEval</td> <td>function replaceText(input) {return input.replace('foo', 'bar');}</td> <td>replaceText</td> </tr> But the next line fails to find the definition: replaceText is not defined I've also

Xpath to determine checkbox “checked” attribute in Selenium IDE

只谈情不闲聊 提交于 2019-12-05 07:47:44
How to determine if a checkbox is check or not through xpath Currently I am trying : //input[@type='checkbox' and @checked='true')] I have multiple checkboxes with same ids so I have to select the next checkbox which is not selected/checked. Specifically I need this for Selenium IDE Edit what I actually need is sth like : |storeXpathCount | //input[@name='xyz' and @checked='checked'] | is_checked | if checkbox 'xyz' is checked , is_checked value should be 1 else 0 thanks Here stnewrecord is class of check-box. Script will store number of check-box, and according to that loop will follow. It

Can I use Selenium IDE to generate Cucumber/Capybara steps?

你说的曾经没有我的故事 提交于 2019-12-05 05:04:01
I've both installed Selenium IDE (Firefox addon) and Capybara (gem). I'm now driving Selenium from Cucumber/Capybara steps (@javascript) in my rails app. The question is: Can I export Selenium IDE steps as Cucumber/Capybara steps? In Selenium IDE Options > Format I can only see Ruby (Test::Unit) and RSpec, but having Capybara format as well would be awesome . Thank you. I don't believe it is possible to export Selenium IDE tests as Cucumber scenarios. Honestly, I'm not even convinced that it would make sense to build such an exporter - Selenium IDE tests are focused on the technical

How do you upload a file using Selenium IDE?

人盡茶涼 提交于 2019-12-05 04:25:49
This used to work in the past, but recently I've been trying to upload a file using Selenium IDE, and now I'm getting this error: [error] Unexpected Exception: code -> 1000, INDEX_SIZE_ERR -> 1, DOMSTRING_SIZE_ERR -> 2, HIERARCHY_REQUEST_ERR -> 3, WRONG_DOCUMENT_ERR -> 4, INVALID_CHARACTER_ERR -> 5, NO_DATA_ALLOWED_ERR -> 6, NO_MODIFICATION_ALLOWED_ERR -> 7, NOT_FOUND_ERR -> 8, NOT_SUPPORTED_ERR -> 9, INUSE_ATTRIBUTE_ERR -> 10, INVALID_STATE_ERR -> 11, SYNTAX_ERR -> 12, INVALID_MODIFICATION_ERR -> 13, NAMESPACE_ERR -> 14, INVALID_ACCESS_ERR -> 15, VALIDATION_ERR -> 16, TYPE_MISMATCH_ERR -> 17,

Set selenium webdriver's default execution speed

隐身守侯 提交于 2019-12-05 02:15:24
问题 I'm running some GUI tests with webdriver. I exported some tests directly from selenium IDE. In this test I had to decrease IDE's speed to run it due to the loading of a drop down. How can I slow down my test in Selenium webdriver? I already put driver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS); and it kept running at a fast speed. I know the sleep option but that's not what I'm looking for, I would like to change the webdriver's default execution speed. Here's my code: import

How can I read Variables from data pool with Selenium IDE?

不问归期 提交于 2019-12-05 00:42:28
问题 I am using Selenium IDE to test a web based HR/SW system. There is a screen that used to enter vacation for employees. I am having nearly 3000 employee. I built a test case that enter vacations for one employee using variables. How can I repeat the test case for all 3000 employees without creating the test case 3000 times. It will take an impossible effort to do that. Note: Each employee is having different vacation data (Type, start date, End date) Is there any way that I can use a file

Selenium IDE - Set default speed to slow

断了今生、忘了曾经 提交于 2019-12-04 17:48:33
问题 Everytime when I run Selenium IDE the speed control is set to "fast" It is possible to set the speed control per default to "slow"? 回答1: Put this command in the beginning of your script: Command: setSpeed Target: 3000 The IDE has a slow speed and a fast speed. However, this is more precise so you can control the delay per command in milliseconds. This example will have it wait 3 seconds per command. 回答2: To expand on MacGyver's response, you can put the setSpeed anywhere in your tests, not