How to identity element in selenium for below html [closed] - selenium

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
<a href="XXXX.asp?WCI=XXXX_Process&CacheID=123351730222025121&menuopt=Policy&TransTyp=NBS">
<strong><font face="Arial" color="Navy">New Business - Rate</font></strong>
</a>
How to identity element in above html,I tried below code but it didnt work out
driver.findelement(By.cssselector(a[href='given the full href link'])).click ()--didn't work out due to cacheID is dyanamic
driver.findelement(By.cssselector(a[href*='TransTyp=NBS'])).click () --tried with partial word didnt work either
Kindly help me on this.
i tried same thing in chrome it works like a charm,even my earlier code works fine with chrome.Not sure if internet explorer has any issue handing them . I am using windows 10 OS and internet explorer comes with it.
In Internet explorer i can able to login with selenium after the landing page when i want to click new business link its not working,but the same code works fine in chrome.
Is there any reason for this ?

You should use XPath. And you need two steps here:
Find element by text
Find closest a to element with link text
Here is XPath which does that:
driver.findelement(By.xpath("//*[text()='New Business - Rate']/ancestor-or-self::a"))

driver.findElement(By.linkText("New Business - Rate"));

Worked on this issue after longtime.Its my fault, not aware of Frames concept.
The webpage i was working involves Frames in Internet explorer.
Working fine with linktext itself.Thank you

Related

why wont the arrows on my QDoubleSpinBox not work anymore? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 days ago.
Improve this question
Currently developing a UI using python and Pyqt5. The for some reason both the QDoubleSpinBox's have stopped working via the arrows. The value is editable when clicked in and manually deleted and reentered but the arrows will not respond.
I have plenty of iterations of this code saved and I have gone back and compare versions where the spin boxes still work. I have google searched just about everything I can think of and no one has had a similar issue I guess. So kudos to anyone who may be able to help. Included below is a screenshot of the UI and the portions of corresponding python script that reference the spin boxes which yes, is very large.
P.S. for sticklers,
yes I know the layout is unorganized and ugly, this is by no means a finished product.
UI screenshot
[1](https://i.stack.imgur.com/hdW9o.png)
[2](https://i.stack.imgur.com/xRmkW.png)
[3](https://i.stack.imgur.com/iCdAr.png)
[4](https://i.stack.imgur.com/B2Vuf.png)

Initializing the APIs Explorer [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am an IT also G suite Administrator.
When I use API explorer : https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/update
I got this error :
Error initializing the APIs Explorer
Cannot find specified method in converted discovery doc.
I check this page : https://developers.google.com/discovery/v1/reference/apis
But I still don't understand.
This seems to be a bug:
Try this API functionality is currently not working for some of the methods of Admin SDK, including the ones from Directory API and Reports API.
Instead of displaying the usual Try this API sidebar:
The message you mentioned is getting displayed:
Because of this, you cannot currently try these methods in the reference docs.
Issue Tracker:
This problem has already been reported before in Issue Tracker, and it has been forwarded internally by Google:
Error initializing the APIs Explorer
Anyone affected by this, please consider clicking the star on the top-left of the referenced issue in order to receive updates and to help prioritizing this.

How to use reCaptcha2 solving Services in Selenium python : Python Auto Captcha solver [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I am trying to automate a website and it's displaying captcha at some point I just want to know how I can add Auto Recaptcha solving services in my code so the execution of the code does not stop. I have tried Anti-captcha but it's not working and they don't have proper instruction on how I can use their service.
https://anticaptcha.atlassian.net/wiki/spaces/API/pages/196635/Documentation+in+English
This is an anti-captcha documentation page but I am not getting what I have to do to use it in python.
Is there any way I can bypass reCaptcha using any paid service?
I've used 2captcha before for automating captcha solving. So that would be my first go to. They have easy to read documentation and getting it setup with selenium isnt to challenging. https://2captcha.com/api_examples

Getting past Watir & Basic Authentication [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
BLUF: Has anyone had luck bypassing/authenticating Apache Basic Authentication? Passing the username and password in the url string does not work.
I've looked through several questions here on SO and on blogs like WatirMelon.blog. The problem I have is simple: watir does not use the username/password passed along the urlstring to authenticate with the website.
Code
browser b = Watir::Browser.new(:chrome)
b.goto('https://user:passwd#my.site.com/index.htm')
I've even tried something akin to the following:
browser b = Watir::Browser.new(:chrome)
b.goto('https://my.site.com/index.htm')
sleep 5
b.send_keys("user{TAB}passwd{ENTER}")
and still have not had luck. It appears that once the basic auth window pops up, all actions halt until user input.
Does anyone have recommendations I haven't tried?
Admin notes:
* OS: Ubuntu 16.04
* Browser: Chrome (obviously)
* Watir 6
Watir will pass the url string to the url bar in the browser, but that doesn't mean the website will accept it (some do, some do not).
Basic authentication is a function handled by the operating system which is outside of the scope of Selenium & Watir. The best way to deal with it is to use a proxy like BrowserMob Proxy.

Navigating to next page in Selenium IDE. [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
On the web application i am currently working on, there is a button. When i click on that button using selenium IDE, IDE doesnot record the click. I clicked the button using button id/css/xpath, it clicks on it but doesnot get to the new page that it is supposed to. However it manages to complete the next scripts and passes the test.
I used Selenium Advanced UI Interactions to click on the button.