tebeka / selenium

Selenium/Webdriver client for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

small help at selenium

LeaDer-E opened this issue · comments

Alsalam Alykum (Hello)

I need very little help with two things

1. First: How can I open a link in a new tab page using Selenium, if I have my xpath and let's say this is:

('//*[@id="app"]/div[1]/div[1]/div[1]/a')

2. The second: I have three lines of selector and xpath,, How can I increment any one of them to make them 100 lines without typing them manually, please look at this picture to know what i mean 😄

Screenshot at 2022-02-18 01-39-35

with for condition i have made that

“div:nth-child(1)”
“div:nth-child(2)”
“div:nth-child(3)”
“div:nth-child(4)”
“div:nth-child(5)”
“div:nth-child(6)”
“div:nth-child(7)”
“div:nth-child(8)”
“div:nth-child(9)”

but i'm need to know how can i open each one in new tab one by one

let we say to open the fries xpath: “div:nth-child(1)” in new tab, then do any thing in this link, then close it to open the secont xpath link

sorry for bad English 🌹