selenium-ide

Missing the context menu showing verify and/or assert commands for recording with Selenium IDE

跟風遠走 提交于 2019-12-08 05:37:50
问题 For a long time I have been using Selenium IDE to record and playback web applications for test purposes. Normally when I build a script, for each new page I would right click on a unique piece of text and select the command wait to ensure that when playing back Selenium doesn't move on until that page has loaded. For some reason when I now right click the command context menu does appear in my list. Since then downloaded the latest version of IDE but no success. Any ideas? 回答1: Install the

Can I tell Selenium to record in DOM mode instead of element ID mode?

一曲冷凌霜 提交于 2019-12-08 04:28:40
问题 I have been using Selenium in my DEV environment. When I go to try some of my recorded tests on my Test environment, I find that the elements have different IDs (they are generated by the web framework). I can change the test manually to use document.forms[2].elements[3] instead of by id, which looks like this: ellaMform:j_id77 I'm looking for a way to tell selenium to record the dom:index value for the controls so that tests will be the same between DEV and TEST. Similar question on SO

How to select proper Action for web target in Selenium IDE

蓝咒 提交于 2019-12-08 00:37:07
问题 I am new to Selenium IDE. As far as I know, when open Selenium IDE, you will notice that the red 'record macro' button is toggled. This means that selenium will attempt to record every action you make inside the browser. This is a problematic way of recording as we implicitly wait for actions to complete before moving on. If I only let Selenium to record every actions without specifying extra actions, many test step will be failed with error message : Element not found. I was trying to add

How can I customise the Selenium IDE export?

 ̄綄美尐妖づ 提交于 2019-12-07 17:05:51
问题 Within Selenium IDE for Firefox, under Options -> C# / NUnit / Webdriver, there is a button 'Source' to view the conversion formatter. It is displayed in read-only format. Is it possible to get access to this file in order to customise the export process? Sorry if this seems like a trivial question, I've found plenty of people complaining about not being able to perform various tasks online and a few responses that indicate that custom export is supported, but I can't seem to find a way to

Selenium IDE - always fail on any 500 error

半腔热情 提交于 2019-12-07 08:10:25
问题 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. 回答1: 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

How to store the content/value of xpath?

ぃ、小莉子 提交于 2019-12-07 07:14:58
问题 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 ? 回答1: Try storeText (

How to create custom functions in Selenium IDE?

喜夏-厌秋 提交于 2019-12-07 06:47:22
问题 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

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

自作多情 提交于 2019-12-07 02:02:53
问题 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. 回答1: I don't believe it is possible to export Selenium IDE tests as Cucumber scenarios. Honestly, I'm not even convinced

Selenium - how to switch to a different (login) window that is brought up?

孤者浪人 提交于 2019-12-06 15:21:16
My application has an admin account and the testing has been within that. This account then has hyperlinks for 'regular' users that they use for their login, for example: One http://dmplanning-stage.herokuapp.com/p/7Fimn1FRs1WZe5xmFTUA Two http://dmplanning-stage.herokuapp.com/p/FRs1WZe7Fimn15TUAxmF Three http://dmplanning-stage.herokuapp.com/p/mFTUA7Fimn1FRs1WZe5x These links are generated each time I run the test suite and the id's are different. I've created a test to locate and click on the hyperlink on a page that lists these users and their login hyperlinks. The test runs and selenium

selenium Test case for facebook login and logout

橙三吉。 提交于 2019-12-06 11:44:18
Scenario is to Login to facebook account and then logout. I tried using xpath className and id. But everytime it shows error as ElementNotfound or element not visible. Later I Checked it using SELENIUM IDE and got this xpath for the LOGOUT link. But still the error persists. Kindly help me. public class FacebookLogin { public static void main(String[] args) throws InterruptedException { // TODO Auto-generated method stub WebDriver driver = new FirefoxDriver(); driver.manage().window().maximize(); driver.get("https://www.facebook.com/"); Thread.sleep(2000); WebElement username = driver