Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Get current address" & selenium.getAttribute help request #24

Open
GoogleCodeExporter opened this issue Mar 31, 2015 · 2 comments
Open

Comments

@GoogleCodeExporter
Copy link

Operating system : Win7
.Net Framework version : 2.0.7045
Office Version : 2003
SeleniumWrapper version : 1.0.11.0

1) Pls could you provide sample VBA code that will retrieve underlying link for 
a given cell in a table?

I was trying to use the following code, but with no luck :
selenium.getAttribute("xpath=//table[1]//tr[1]/td[1]@href")
(I get blank value)

2) Pls could you also provide sample VBA code that will return current 
http://www address as per address bar in the browser?
following the command:
selenium.Open "https://www.google.com"
"Selenium.getAddress" should return "https://www.google.co.uk", for example if 
get redirected to .co.uk domain


Original issue reported on code.google.com by [email protected] on 11 Jun 2013 at 12:04

@GoogleCodeExporter
Copy link
Author

> 1) Pls could you provide sample VBA code that will retrieve underlying link 
for a given cell in a table?
Your xpath query is incorrect as an href attribute is not available for a TD 
tag.
As a don't have your html source, I can only suggest a solution:
selenium.getAttribute("xpath=//table[1]//tr[1]/td[1]/a@href")

I recommend you to test your xpath in Firebug by using this command :
$x("//table[1]//tr[1]/td[1]/a@href");

> 2) Pls could you also provide sample VBA code that will return current 
http://www address as per address bar in the browser?
url = selenium.URL
or
url = selenium.getLocation()

Original comment by florentbr on 11 Jun 2013 at 2:01

  • Changed state: Accepted
  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Original comment by florentbr on 8 Sep 2014 at 5:40

  • Changed state: Done
  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant