0

How can I click on the following using Selenium in python?

<a onclick="ClearTrackingCode();" id="ctl00_phMainContent_CampaignGrid_grid_ctl02_btnSelect" title="Edit the selected campaigns" href="javascript:__doPostBack('ctl00$phMainContent$CampaignGrid$grid$ctl02$btnSelect','')">201362</a>

I have tried by ID + Name + Xpath

//*[@id="ctl00_phMainContent_CampaignGrid_grid_ctl02_btnSelect"]

1 Answer 1

1
execute_script

fixed the issue.

execute_script(script, *args) Synchronously Executes JavaScript in the current window/frame.

Args :
script: The JavaScript to execute. *args: Any applicable arguments for your JavaScript. Usage : driver.execute_script(‘document.title’)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.