
получается там, куда указывает стрелка должна быть команда click и xpath скрепки, а ее нет. хотя у меня открывается окно загрузки файла, я выбираю файл, жму ОК и вижу уже следующую команду по добавлению имени файла в форму.

138 публикаций создано Jenka156 (учитываются публикации только с 13 июля 2024)
Отправлено автор:
Jenka156
12 августа 2011 - 05:27
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
11 августа 2011 - 10:28
в
Selenium - Functional Testing
<div class="x-grid3-row ux-maximgb-tg-level-1 " style="width: 658px; "> <table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="width: 658px; "> <tbody> <tr> <td class="x-grid3-col x-grid3-cell x-grid3-td-name x-grid3-cell-first " style="width: 283px; " tabindex="0"> <div class="x-grid3-cell-inner x-grid3-col-name" unselectable="on"> АФайл </div> </td> <td class="x-grid3-col x-grid3-cell x-grid3-td-1 " style="width: 341px; " tabindex="0"> <div class="x-grid3-cell-inner x-grid3-col-1" unselectable="on"> </div> </td> <td class="x-grid3-col x-grid3-cell x-grid3-td-2 x-grid3-cell-last " style="width: 34px; " tabindex="0"> <div class="x-grid3-cell-inner x-grid3-col-2" unselectable="on"> <form id="F259_10" name="F259_10" method="POST" action="/user/edituser/upload" class="file-upload-form"> <input type="file" name="myfile" id="myfile259_10" size="1" class="file-uploader" title="Редактировать" onchange="uploadFile('259_10', 7);"> <img src="/Skins/defaultskin/Images/addFile.png" class="file-upload-pict"> </form> </div> </td> </tr> <tr class="x-grid3-row-body-tr" style=""><td colspan="3" class="x-grid3-body-cell" tabindex="0" hidefocus="on"><div class="x-grid3-row-body"> </div> </td> </tr> </tbody> </table> </div> <div class="x-grid3-row ux-maximgb-tg-level-1 x-grid3-row-alt" style="width: 658px; "> <table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="width: 658px; "> <tbody> <tr> <td class="x-grid3-col x-grid3-cell x-grid3-td-name x-grid3-cell-first " style="width: 283px; " tabindex="0"> <div class="x-grid3-cell-inner x-grid3-col-name" unselectable="on"> ВФайл </div> </td> <td class="x-grid3-col x-grid3-cell x-grid3-td-1 " style="width: 341px; " tabindex="0"> <div class="x-grid3-cell-inner x-grid3-col-1" unselectable="on"> </div> </td> <td class="x-grid3-col x-grid3-cell x-grid3-td-2 x-grid3-cell-last " style="width: 34px; " tabindex="0"> <div class="x-grid3-cell-inner x-grid3-col-2" unselectable="on"> <form id="F260_10" name="F260_10" method="POST" action="/user/edituser/upload" class="file-upload-form"> <input type="file" name="myfile" id="myfile260_10" size="1" class="file-uploader" title="Редактировать" onchange="uploadFile('260_10', 7);"> <img src="/Skins/defaultskin/Images/addFile.png" class="file-upload-pict"> </form> </div> </td> </tr> <tr class="x-grid3-row-body-tr" style=""><td colspan="3" class="x-grid3-body-cell" tabindex="0" hidefocus="on"><div class="x-grid3-row-body"> </div> </td> </tr> </tbody> </table> </div>
Отправлено автор:
Jenka156
10 августа 2011 - 13:34
в
Selenium - Functional Testing
<td class="x-grid3-col x-grid3-cell x-grid3-td-2 x-grid3-cell-last x-grid3-cell-selected" style="width: 34px; " tabindex="0"> <div class="x-grid3-cell-inner x-grid3-col-2" unselectable="on"> <form id="F259_10" name="F259_10" method="POST" action="/user/edituser/upload" class="file-upload-form"> <input type="file" name="myfile" id="myfile259_10" size="1" class="file-uploader" title="Редактировать" onchange="uploadFile('259_10', 7);"> <img src="/Skins/defaultskin/Images/addFile.png" class="file-upload-pict"> </form> </div> </td>
<td class="x-grid3-col x-grid3-cell x-grid3-td-2 x-grid3-cell-last " style="width: 34px; " tabindex="0"> <div class="x-grid3-cell-inner x-grid3-col-2" unselectable="on"> <form id="F260_10" name="F260_10" method="POST" action="/user/edituser/upload" class="file-upload-form"> <input type="file" name="myfile" id="myfile260_10" size="1" class="file-uploader" title="Редактировать" onchange="uploadFile('260_10', 7);"> <img src="/Skins/defaultskin/Images/addFile.png" class="file-upload-pict"> </form> </div> </td>
Отправлено автор:
Jenka156
11 августа 2011 - 13:33
в
Selenium - Functional Testing
$this->mouseDownAt($this->clip1, "4,4"); $this->mouseUpAt($this->clip1, "4,4");окно все равно не появляется...
Отправлено автор:
Jenka156
12 августа 2011 - 06:51
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
20 декабря 2011 - 11:53
в
Selenium - Functional Testing
org.openqa.selenium.interactions.MoveTargetOutOfBoundsException: Element cannot be scrolled into view:http://2do2go.mordor.fabit.ru/feed Command duration or timeout: 31 milliseconds Build info: version: '2.15.0', revision: '15105', time: '2011-12-08 09:56:25' System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_01' Driver info: driver.version: RemoteWebDriver Command duration or timeout: 301 milliseconds Build info: version: '2.15.0', revision: '15105', time: '2011-12-08 09:56:25' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-36-generic', java.version: '1.6.0_20' Driver info: driver.version: RemoteWebDriver
Отправлено автор:
Jenka156
21 декабря 2011 - 08:28
в
Selenium - Functional Testing
@Test(alwaysRun=true) public void Tabs() throws InterruptedException{ //-- переход на Календарь this.WaitForElementLoad(120, "//div[@id='right-local-nav']/a[@class='local-nav-btn']"); driver.findElement(By.xpath("//div[@id='right-local-nav']/a[@class='local-nav-btn']")).click(); this.WaitForElementLoad(120, "//div[@id='left-local-nav']/a[@class='local-nav-btn']/*[text()='Лента']"); Assert.assertTrue(this.IsElementPresent("//div[@id='left-local-nav']/a[@class='local-nav-btn']/*[text()='Лента']")); driver.findElement(By.xpath("//table[@class='cal-week']")); //-- переход на Ленту driver.findElement(By.xpath("//div[@id='left-local-nav']/a[@class='local-nav-btn']")).click(); this.WaitForElementLoad(120, "//div[@id='left-local-nav']/a[@class='local-nav-btn']/*[text()='Топ']"); Assert.assertTrue(this.IsElementPresent("//div[@id='left-local-nav']/a[@class='local-nav-btn']/*[text()='Топ']")); driver.findElement(By.xpath("//div[@class='main-block-head active-head']")); //-- переход на Топ driver.findElement(By.xpath("//div[@id='left-local-nav']/a[@class='local-nav-btn']")).click(); this.WaitForElementLoad(120, "//div[@id='top_content']"); Assert.assertTrue(this.IsElementPresent("//div[@id='top_content']")); driver.findElement(By.xpath("//h1[text()='Топ']")); } public class ElementPresent implements ExpectedCondition<WebElement> { private final By locator; public ElementPresent(By locator) { this.locator = locator; } @Override public WebElement apply(WebDriver driver) { return driver.findElement(locator); } } public void WaitForElementLoad(int time, String element_xpath){ new WebDriverWait(driver, time).until(new ElementPresent(By.xpath(element_xpath))); }
Отправлено автор:
Jenka156
21 декабря 2011 - 10:01
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
18 ноября 2011 - 06:47
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
26 августа 2011 - 13:53
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
23 августа 2011 - 13:53
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
22 августа 2011 - 12:23
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
22 августа 2011 - 12:15
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
26 августа 2011 - 11:15
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
26 августа 2011 - 13:23
в
Selenium - Functional Testing
<?php require_once 'PHPUnit/Extensions/SeleniumTestCase.php'; class create_users extends PHPUnit_Extensions_SeleniumTestCase { function setUp() { $this->setBrowser("*firefox"); $this->setBrowserUrl("http://beta.test.lan/"); $this->setTimeout(10000000); } function testMyTestCase() { //-----------------вход в систему $this->open("/"); $this->LoginUser("admin", "admin"); // вход под админом $this->GoToMenu($this->menu_tools, $this->tools_admin, $this->tools_admin_users_rights); // переход в нужное меню $this->waitForPageToLoad(600000); $this->clickAt($this->department_1); // переход к нужному подразделению $this->clickAndWait($this->user_pict); // выбор пользователя $this->waitForPageToLoad(600000); //--------------назначение выбранному пользователю всех прав $this->clickAt("//table[@id='rights_for_administration']//tbody//tr[1]//td[2]//input"); $this->clickAt("//table[@id='rights_for_document_init']//tbody//tr[1]//td[2]//input"); $this->clickAt("//table[@id='rights_for_document_control']//tbody//tr[1]//td[2]//input"); $this->clickAt("//table[@id='rights_for_document_paste']//tbody//tr[1]//td[2]//input"); $this->clickAt("//table[@id='rights_for_routes']//tbody//tr[1]//td[2]//input"); $this->clickAt("//table[@id='global_rights_for_groupsrights']//tbody//tr[1]//td[2]//input"); $this->clickAt("//table[@id='rights_for_taskstemplates']//tbody//tr[1]//td[2]//input"); $this->clickAt("//table[@id='rights_for_plugins']//tbody//tr[1]//td[2]//input"); $this->clickAt("//table[@id='rights_on_dictionary']//tbody//tr[1]//td[1]//input"); $this->clickAt("//table[@id='rights_on_tasktype']//tbody//tr[1]//td[2]//input"); $this->clickAt("//table[@id='rights_on_calendar']//tbody//tr[1]//td[1]//input"); $this->clickAt("//table[@id='rights_for_outerUserGroup'][1]//tbody//tr[1]//td[2]//input"); $this->clickAt("//table[@id='rights_for_outerUserGroup'][2]//tbody//tr[1]//td[2]//input"); //-------------------сохранение изменений $this->clickAt("//input[@value='Сохранить']"); $this->waitForPageToLoad(600000); $this->assertTrue($this->isElementPresent("//div[text()='Изменения сохранены']")); } }
Отправлено автор:
Jenka156
23 августа 2011 - 12:57
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
29 августа 2011 - 05:07
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
07 декабря 2011 - 07:08
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
07 декабря 2011 - 12:15
в
Selenium - Functional Testing
public class LogInLogOut extends main_class{ @Test(alwaysRun=true) public void LoginLogoutUser() throws InterruptedException{ this.WaitForElementLoad(15, "//a[text()='Войти']"); driver.findElement(By.linkText("Войти")).click(); //-- ввод неверных данных this.WaitForElementLoad(15, "//input[@name='username']"); driver.findElement(By.name("username")).sendKeys("test@gmail.com"); driver.findElement(By.name("password")).sendKeys("234"); driver.findElement(By.id("auth-submit")).click(); this.WaitForElementLoad(15, "//span[text()='Неправильный логин или пароль!']"); driver.findElement(By.xpath("//span[text()='Неправильный логин или пароль!']")); //-- ввод верных данных driver.findElement(By.name("username")).clear(); driver.findElement(By.name("username")).sendKeys("test@gmail.com"); driver.findElement(By.name("password")).clear(); driver.findElement(By.name("password")).sendKeys("q2wsx'56'"); driver.findElement(By.id("auth-submit")).click(); this.WaitForElementLoad(15, "//a[text()='Тестовый Пользователь']"); driver.findElement(By.xpath("//a[text()='Тестовый Пользователь']")); //-- выход из системы driver.findElement(By.linkText("Выйти")).click(); this.WaitForElementLoad(15, "//a[text()='Войти']"); driver.findElement(By.xpath("//a[text()='Войти']")); driver.findElement(By.xpath("//a[text()='Регистрация']")); } @Test(alwaysRun=true) public void RegisterUser() throws InterruptedException{ this.WaitForElementLoad(15, "//a[text()='Регистрация']"); driver.findElement(By.xpath("//a[text()='Регистрация']")).click(); this.WaitForElementLoad(15, "//h1[text()='Регистрация']"); driver.findElement(By.xpath("//h1[text()='Регистрация']")); driver.findElement(By.xpath("//div[@id='reg-dialog']/form//input[@name='username']")).sendKeys("tttest11@mail.ru"); driver.findElement(By.name("firstName")).sendKeys("Иван"); driver.findElement(By.name("lastName")).sendKeys("Иванов"); driver.findElement(By.xpath("//div[@id='reg-dialog']/form//input[@name='password']")).sendKeys("123"); driver.findElement(By.name("confirm_password")).sendKeys("123"); driver.findElement(By.xpath("//input[@value='Регистрация']")).click(); } }
Отправлено автор:
Jenka156
08 декабря 2011 - 07:39
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
08 декабря 2011 - 05:33
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
08 декабря 2011 - 19:01
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
07 декабря 2011 - 11:28
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
09 декабря 2011 - 05:55
в
Selenium - Functional Testing
Отправлено автор:
Jenka156
02 июля 2012 - 11:10
в
Selenium - Functional Testing
Community Forum Software by IP.Board Русификация от IBResource
Лицензия зарегистрирована на: Software-Testing.Ru