Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package bean
- import org.openqa.selenium.By
- import org.springframework.test.context.ContextConfiguration
- import org.springframework.test.context.testng.AbstractTestNGSpringContextTests
- import org.testng.annotations.Test
- import spring.PageManager
- import spring.SpringConfiguration
- import ui.Page1
- @ContextConfiguration(classes = [SpringConfiguration::class])
- class TestBean : AbstractTestNGSpringContextTests() {
- @Test
- fun tt2() {
- val driver = PageManager.getDriver()
- val page1 = PageManager.getPage(Page1::class.java, driver)
- page1.open()
- driver.findElement(By.xpath("(.//a[text()='В корзину'])[1]")).click()
- }
- @Test
- fun tt3() {
- val driver = PageManager.getDriver()
- driver.get("https://www.officemag.ru/catalog/goods/141409/")
- driver.findElement(By.xpath("(.//a[text()='В корзину'])[1]")).click()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement