7Gabriel / selenium-vba

Automatically exported from code.google.com/p/selenium-vba
0 stars 0 forks source link

Click item "a" and "href =" #134

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Operating system : Windows 8.1 Pro, NT
.Net Framework version : 4.5
Office Version : Excel 2013
SeleniumWrapper version : 1.0.23.0
Browser: Firefox 35.0.1

What is your issue ?
Hello as I am new and I'm learning, I must translate into Spanish all the 
information you encounter and want to learn better using "Selenium".,
My project is in "Excel 2013" and I control "Firefox 35.0.1" with "Selenium", 
my problem is to "click" the next item of a website:

<a href="/settings/54be7d4b4c3d79dc33000005"> Settings </a>

The "54be7d4b4c3d79dc33000005" value always changes

I've tried:
FFx Dim As New SeleniumWrapper.WebDriver
FFx.Start "firefox", "https: // xxxxxxxxx"
FFx.Open "xxxxxxxxxx"

Option 1:
FFx.findElementByPartialLinkText ("settings"). Click

option 2
FFx.findElementByTagName ("a"). FindElementByLinkText ("Settings"). Click

option 3
FFx.findElementByCssSelector ("href $ = / settings"). Click

option 4
FFx.Click "href $ = / settings /"

But as mentioned'm new and I'm learning, I must translate into Spanish all the 
information that I met her, without solving my problem, much appreciate your 
support in learning to perform this function.

Would understand better shape with some example.
Greetings Edwin.

Original issue reported on code.google.com by edwin.me...@gmail.com on 6 Feb 2015 at 6:05

GoogleCodeExporter commented 8 years ago
Hi I again, I solved my problem, with this format:

FFx.findElementsByTagName("a").Item(9).Click

Greetings Edwin

' SPANISH
Hola, soy nuevo y estuve buscando una solucion a mi problema planteado, se que 
la mayoria hablan en igles y me ha costado un verdadero mundo encontrar 
informacion en español pero que me de mas soluciones a cosas mas especificas, 
espero se entienda lo planteado, pero sepan que aqui hay uno mas dandole al 
codigo ajajajaja

Original comment by edwin.me...@gmail.com on 6 Feb 2015 at 8:21

GoogleCodeExporter commented 8 years ago
Just be aware that for now Firefox 35 is not fully compatible Selenium due to 
this issue:
https://code.google.com/p/selenium/issues/detail?id=8390
I recommend you to downgrade to Firefox 34

Original comment by florentbr on 6 Feb 2015 at 9:11

GoogleCodeExporter commented 8 years ago
hi! to all !!!

this is te code HTML

' <i class="icon-reorder"></i>
' <a href="/settings/54be7d4b4c3d79dc33000005">Settings</a>

respect to my problem, the best solution was:

FFx.Click "//i[@class='icon-reorder']"
FFx.Click "//a[@href=contains(text(),'Settings')]"

and funtion ok!!! with SeleniumWrapper version : 1.0.23.0 and Browser: Firefox 
35.0.1... 

Greetings Edwin!!!!

Original comment by edwin.me...@gmail.com on 10 Feb 2015 at 1:57