selenium-ide

How to upload file in selenium-ide 3-7-4

旧城冷巷雨未停 提交于 2019-11-27 08:52:33
问题 we need to switch to the second window select title is not working in this case how can we do that pleaseenter image description here 回答1: 1) Using sendkeys we can send file path name:- It’s the most basic technique to perform the upload of a file.Get the file upload element either by using the Id or Name. And call the Webdriver’s sendKeys() method to set the value of the file to upload. Remember following two things when uploading files in WebDriver 1)There is no need to simulate the

How to record popup windows with selenium IDE

♀尐吖头ヾ 提交于 2019-11-27 07:21:22
问题 While recording through Selenium IDE, When a pop up window opens it is not getting recorded. "At the time of executing an error message is displayed.Please help me out. 回答1: If that pop up window has name, like opening from javascript window.open(URL, name). Then it is possible to add the command to check the content of the popup. Like following command: waitForPopUp | winId | 30000 selectWindow | winId ... close However, if the window has no name, like opened from <a target="_blank"> then

Selenium web driver: cannot be scrolled into view

寵の児 提交于 2019-11-27 02:10:09
I am using Selenium IDE and Selenium web driver testng in eclipse .. my testing is against ZK application .. the test case works fine on Selenium IDE .. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head profile="http://selenium-ide.openqa.org/profiles/test-case"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="selenium.base" href="http://*****/> <title>work it2</title> </head> <body> <table

Click in OK button inside an Alert (Selenium IDE)

六眼飞鱼酱① 提交于 2019-11-27 00:29:54
I need to click the 'Ok' button inside an alert window with a Selenium command. I've tried assertAlert or verifyAlert but they don't do what I want. It's possible the click the 'Ok' button? If so, can someone provide me an example of the Selenium IDE command? amra Try Selenium 2.0b1. It has different core than the first version. It should support popup dialogs according to documentation : Popup Dialogs Starting with Selenium 2.0 beta 1, there is built in support for handling popup dialog boxes. After you’ve triggered and action that would open a popup, you can access the alert with the

Can Selenium verify text inside a PDF loaded by the browser?

南笙酒味 提交于 2019-11-26 23:02:41
问题 My web application loads a pdf in the browser. I have figured out how to check that the pdf has loaded correctly using: verifyAttribute xpath=//embed/@src {URL of PDF goes here} It would be really nice to be able to check the contents of the pdf with Selenium - for example verify that some text is present. Is there any way to do this? 回答1: While not natively supported, I have found a couple ways using the java driver. One way is to have the pdf open in your browser (having adobe acrobat

Selenium IDE for Firefox Ctrl-Tab

て烟熏妆下的殇ゞ 提交于 2019-11-26 22:04:52
问题 I'm attempting to automate some settings in multiple forms from a list that I open into their own tabs. The easiest way that I can prep the pages prior to running the script is to have them all open . I intend to have selenium run through the changes to the form, then I want it to Ctrl + Tab to the next one. I will use a loop while to set the count. I currently have it recording in HTML, if I need to adjust it over to java or I will gladly do so. I've attempted to record it, but no go. 回答1:

Load an external js file containing useful test functions in selenium

我的未来我决定 提交于 2019-11-26 21:43:54
问题 The runScript command in selenium is really useful, and I'm using it to total values in a table and then store the value like this <tr> <td>runScript</td> <td>var cumulative = 0.0; $('table.quote-review-group-component').eq(0).find('tr').each( function( i,el ){var singleStackTotal = $(el).find('td').eq(4).html();if( singleStackTotal ){cumulative += parseFloat( singleStackTotal.substring(1) );} }); cumulative = cumulative.toFixed(2)</td> <td></td> </tr> <tr> <td>storeEval</td> <td>selenium

Using upper-case and lower-case xpath functions in selenium IDE

天大地大妈咪最大 提交于 2019-11-26 16:32:48
I am trying to get a xpath query using the xpath function lower-case or upper-case , but they seem to not work in selenium (where I test my xpath before I apply it). Example that does NOT work: //*[.=upper-case('some text')] I have no problem locating the nodes I need in complex path and even using aggregated functions, as long as I don't use the upper and lower case. Has anyone encountered this before? Does it make sense? Thanks. upper-case() and lower-case() are XPath 2.0 functions. Chances are your platform supports XPath 1.0 only. Try: translate('some text','abcdefghijklmnopqrstuvwxyz',

How to convert commands recorded in selenium IDE to Java?

隐身守侯 提交于 2019-11-26 15:54:22
问题 Is there any application or simple way to convert all the commands recorded by Selenium IDE to Java (Selenium WebDriver) ? It would be a lot more easier and would save a lot of time. Any suggestions will be appreciated. Thanks! 回答1: In my Selenium IDE version 2.4.0 it is easy as pie: Record testcase in Selenium IDE Click File - Export Test Case As - Java / JUnit4 / WebDriver Save File as .java And here you go! Your testcase is converted to WebDriver ;) 回答2: Update: Starting from SeleniumIDE 3

selenium webdriver upload file

拈花ヽ惹草 提交于 2019-11-26 14:37:08
问题 I am new to selenium, I have a script that uploads a file to a server. In the ide version sort of speak it uploads the file, but when I export test case as python 2 /unittest / webdriver it doesn't upload it.. It doesn't give me any errors, just doesn't upload it... The python script is: driver.find_element_by_id("start-upload-button-single").click() driver.find_element_by_css_selector("input[type=\"file\"]").clear() driver.find_element_by_css_selector("input[type=\"file\"]").send_keys("C:\\\