selenium-ide

Locating select element in Selenium

怎甘沉沦 提交于 2019-12-12 05:27:50
问题 Below is the combobox: <TD ALIGN="left" id="oldcontent"> <select name="status" style="width=150" id="newcontentformat"><option value="14" selected="selected">text1</option> <option value="15">text2</option> <option value="16">text3</option></select> </TD> I need to select text2 in the combobox/dropdown.I have used the below: selenium.select("//select[starts-with(@name,status)","text2"); The probelm am facing is,its giving me an error text2 not found.Since there are may other select boxes

How to open link in new tab

自作多情 提交于 2019-12-12 05:09:54
问题 Selenium IDE : I am trying to open a link in new tab using controlkey or contextmenu and both commands did not work. USING CONTROLKEY : 1). verify element present 2)controlkeydown() 3) click link 4) controlkeyup(). when executed, it displays the error unknown command (control key(). USING CONETXTMENU : 1 ) Verify element present 2) contextmenu target link=linkname 3) click target = link 回答1: My advise to you will be to not test this. Both of the items you are trying to test are features of

Selenium WebDriver and PageFactory Initialization WebElement From Property File

允我心安 提交于 2019-12-12 04:51:13
问题 I am using selenium WebDiver and PageFacotry to initialize webelement,but I want to initialize element at runtime but value should come form xml file or property file. Below statement initialize LogIn_PG_POF all the element which are declare in LogIn_PG_POF class but I want to initialize how(it is a attribute of FindBy annotation) portion from the properties file or xml file so later on I can change easily no need to change in code portion. LogIn_PG_POF LoginPage = PageFactory.initElements

How to store the values of the links in an array using selenium IDE

社会主义新天地 提交于 2019-12-12 03:52:26
问题 I used storeXPathCount to get the set of links matching a specific format. Lets consider the count would be 12. So there are 12 different links available which will have different dates like 20, 21, 22,.....31. I want to store these values of the links in an array and use the values one by one. Getting the first value from array(i.e. 20). Check for condition. If condition fails, increment the array count by 1.(It should be 21). Again check for condition and increment the array. 回答1: You can

Is selenium IDE an XUL add-on in Firefox?

点点圈 提交于 2019-12-12 02:17:48
问题 With Firefox discontinuing the use XUL overlay it raises concerns that Selenium IDE requires this overlay to function. Can anyone confirm one way or the other? Mozilla Will Deprecate XUL Add-ons Before the End of 2017 回答1: Selenium IDE is definitely an overlay/XUL based add-on. It contains an instal.rdf file and chrome.manifest file which uses the overlay directive. Mozilla has stated that all types of extensions, other than WebExtensions, will be disabled in the near future. They have stated

selenium selector - how to check checkboxes?

懵懂的女人 提交于 2019-12-11 21:06:35
问题 I don't seem to be able to use click for checkboxes. No error in the console, it shows the click but the checkbox isn't checked. I have tried using both click and check but neither seem to check the checkbox. Using the database id (102) as suggested by the IDE recorder is not an option as the ID's change with each run. I am trying: css=fieldset.choices ol li label input for my locator. I also tried: //fieldset[@class='choices']//ol//li//label//input and again the console says clicked but the

Selenium IDE Sendkeys() is not working

和自甴很熟 提交于 2019-12-11 12:03:57
问题 I am trying to create a script using Selenium IDE. Trying to enter phone number in the text box field, which accepts the number in the specified format as "(999) 999 - 999" I have used Sendkeys function which doesn't works for this text box. Is there anyway to enter numbers to this text box? 回答1: After SendKeys Command. Can you try using fireEvent command. It will trigger the event for that particular control. 来源: https://stackoverflow.com/questions/31964884/selenium-ide-sendkeys-is-not

Comparing dates in Xpath with different formats

流过昼夜 提交于 2019-12-11 10:57:21
问题 I have a date in this format "21-Mar-2014" I already tried to search for Xpath formulas but with no use I am getting the first format 21-Mar-2014 using SeleniumIDE and want to check if this value is the date of today, So how can xpath generate today's date and compare it for the date extracted using Selenium 回答1: You can parse the string into a date with an xpath function such as date:date(string) (described in this question). Today's date already in xml date format is supplied by fn:current

How to verify that my link title attribute has specified value?

做~自己de王妃 提交于 2019-12-11 10:42:55
问题 I have a link somewhere on my page, let say like this <a href="http://example.com" title="my title message">my link label</a> How to verify, that my link title attribute has 'my title message' value? 回答1: Assertattribute command use to verify it, please check this code. assertattribute | title = my title message@href | http://example.com assertattribute | link=my link label@href | http://example.com 回答2: From Selenium IDE use this: command | target | value ------------------------------------

RobotFramework: Keyword 'Selenium2Library.Input Text' Error Keyword 'Input Username' expected 1 arguments, got 0

非 Y 不嫁゛ 提交于 2019-12-11 09:52:31
问题 Code: Input Username [Arguments] ${username} Input Text login_username_id ${username} Error:- Keyword 'Input Username' expected 1 arguments, got 0 May i know why am i getting this error? 回答1: Pass in self as the first argument in your method. Something like: def input_username(self, arg1): 回答2: The error message is telling you exactly what the problem is: your keyword Input Username expects exactly one argument, but the place where you are calling it is only providing one argument. 来源: https: